Project

General

Profile

« Previous | Next » 

Revision 41e2f693

Added by Cherian Mathew over 9 years ago

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

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/handler/OpenChecklistEditorHandler.java
14 14
import eu.etaxonomy.taxeditor.editor.EditorUtil;
15 15
import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditorInput;
16 16
import eu.etaxonomy.taxeditor.model.AbstractUtility;
17
import eu.etaxonomy.taxeditor.model.MessagingUtils;
17 18
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
18 19
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
19 20

  
......
41 42
                    try {
42 43
                        EditorUtil.open(input);
43 44
                    } catch (PartInitException e) {
44
                        AbstractUtility.error(OpenChecklistEditorHandler.class, "Could not open ChecklistView", e);
45
                    	MessagingUtils.error(OpenChecklistEditorHandler.class, "Could not open ChecklistView", e);
45 46
                    } catch (NullPointerException npe) {
46
                        AbstractUtility.errorDialog("Failed to open Editor", OpenChecklistEditorHandler.class,
47
                    	MessagingUtils.messageDialog("Failed to open Editor", OpenChecklistEditorHandler.class,
47 48
                                "Could not open ChecklistView. The hierarchy is corrupted!", npe);
48 49
                    }
49 50
                } else if (selectedElement instanceof TaxonNode) {
......
51 52
                    try {
52 53
                        EditorUtil.open(input);
53 54
                    } catch (PartInitException e) {
54
                        AbstractUtility.error(OpenChecklistEditorHandler.class, "Could not open ChecklistView", e);
55
                    	MessagingUtils.error(OpenChecklistEditorHandler.class, "Could not open ChecklistView", e);
55 56
                    } catch (NullPointerException npe) {
56
                        AbstractUtility.errorDialog("Failed to open Editor", OpenChecklistEditorHandler.class,
57
                    	MessagingUtils.messageDialog("Failed to open Editor", OpenChecklistEditorHandler.class,
57 58
                                "Could not open ChecklistView. The hierarchy is corrupted!", npe);
58 59
                    }
59 60
                }

Also available in: Unified diff