Revision 41e2f693
Added by Cherian Mathew over 9 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInputFactory.java | ||
---|---|---|
17 | 17 |
import org.eclipse.ui.IMemento; |
18 | 18 |
|
19 | 19 |
import eu.etaxonomy.cdm.api.service.IClassificationService; |
20 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
|
20 | 21 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
21 | 22 |
|
22 | 23 |
|
... | ... | |
51 | 52 |
return null; |
52 | 53 |
} |
53 | 54 |
if (taxonNodeUuid == null || CdmStore.getService(IClassificationService.class).getTaxonNodeByUuid(UUID.fromString(taxonNodeUuid)) == null) { |
54 |
EditorUtil.warn(this.getClass(), "Couldn't find taxon node with UUID " + taxonNodeUuid);
|
|
55 |
MessagingUtils.warn(this.getClass(), "Couldn't find taxon node with UUID " + taxonNodeUuid);
|
|
55 | 56 |
return null; |
56 | 57 |
} |
57 | 58 |
try { |
58 | 59 |
return TaxonEditorInput.NewInstance(UUID.fromString(taxonNodeUuid)); |
59 | 60 |
} catch (Exception e) { |
60 |
EditorUtil.warningDialog("Could not create element", TaxonEditorInputFactory.class, e.getMessage());
|
|
61 |
MessagingUtils.warningDialog("Could not create element", TaxonEditorInputFactory.class, e.getMessage());
|
|
61 | 62 |
} |
62 | 63 |
return null; |
63 | 64 |
} |
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