Revision 41e2f693
Added by Cherian Mathew over 9 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/OpenDerivateViewHandler.java | ||
---|---|---|
11 | 11 |
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase; |
12 | 12 |
import eu.etaxonomy.taxeditor.editor.EditorUtil; |
13 | 13 |
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput; |
14 |
import eu.etaxonomy.taxeditor.model.AbstractUtility;
|
|
14 |
import eu.etaxonomy.taxeditor.model.MessagingUtils;
|
|
15 | 15 |
|
16 | 16 |
public class OpenDerivateViewHandler extends AbstractHandler { |
17 | 17 |
|
... | ... | |
29 | 29 |
try { |
30 | 30 |
EditorUtil.open(input); |
31 | 31 |
} catch (PartInitException e) { |
32 |
AbstractUtility.error(OpenDerivateViewHandler.class, "Could not open DerivateView", e);
|
|
32 |
MessagingUtils.error(OpenDerivateViewHandler.class, "Could not open DerivateView", e);
|
|
33 | 33 |
} catch (NullPointerException npe){ |
34 |
AbstractUtility.errorDialog("Failed to open Editor", OpenDerivateViewHandler.class, "Could not open DerivateView. The derivate hierarchy is corrupted!", npe);
|
|
34 |
MessagingUtils.messageDialog("Failed to open Editor", OpenDerivateViewHandler.class, "Could not open DerivateView. The derivate hierarchy is corrupted!", npe);
|
|
35 | 35 |
} |
36 | 36 |
} |
37 | 37 |
} |
Also available in: Unified diff
Moved all logging and dialog functionality to the new class MessagingUtils.
Refactoring code to adapt to above change.
Added new custom error dialog - CdmErrorDialog
Added runtime exception handling to the ApplicationWorkbenchAdvisor by adding a custom status handler