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/MultiPageTaxonEditor.java
38 38
import eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider;
39 39
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
40 40
import eu.etaxonomy.taxeditor.model.IPartContentHasFactualData;
41
import eu.etaxonomy.taxeditor.model.MessagingUtils;
41 42
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
42 43

  
43 44
/**
......
109 110
			// EditorUtil.showPropertySheet();
110 111

  
111 112
		} catch (PartInitException e) {
112
			AbstractUtility.error(getClass(), e);
113
			MessagingUtils.error(getClass(), e);
113 114
		}
114 115
	}
115 116

  
......
142 143
			monitor.worked(1);
143 144

  
144 145
            this.setDirty(false);
145
            monitor.worked(1);
146
            monitor.worked(1);            
146 147
        } catch (Exception e) {
147 148
            setFocus();
148
            AbstractUtility.dialogForAbortedOperation(e, this, "saving a taxon", " Please close and reopen the taxon again.");
149
            MessagingUtils.operationDialog(this, e, "saving a taxon", " Please close and reopen the taxon again.");
149 150
            disableEditor(true);
150 151
        } finally {
151 152
            monitor.done();
......
416 417
            if (editor instanceof IPostOperationEnabled) {
417 418
                ((IPostOperationEnabled) editor).postOperation(objectAffectedByOperation);
418 419
            } else {
419
                AbstractUtility.warn(getClass(), "postOperation not enabled for editor " + editor);
420
                MessagingUtils.warn(getClass(), "postOperation not enabled for editor " + editor);
420 421
            }
421 422
        }
422
        AbstractUtility.warn(getClass(), "postOperation called on MultiPageTaxonEditor. Can you make it more specific?");
423
        MessagingUtils.warn(getClass(), "postOperation called on MultiPageTaxonEditor. Can you make it more specific?");
423 424

  
424 425
        return false;
425 426
    }
......
499 500
     */
500 501
    public void reload() {
501 502
        if (isDirty()) {
502
            AbstractUtility.warningDialog("Editor has unsaved data", getClass(), "This editor can not be "
503
            MessagingUtils.warningDialog("Editor has unsaved data", getClass(), "This editor can not be "
503 504
                    + "refreshed because it contains unsaved data. Refreshing "
504 505
                    + "this editor would discard the changes. Please save this editor, "
505 506
                    + "close and reopen it manually in order to get the latest content");
......
517 518
                    editorPart.redraw();
518 519
                }
519 520
            } catch (Exception e) {
520
                AbstractUtility.errorDialog("Error refreshing editor", getClass(), "Could not refresh this editor", e);
521
                MessagingUtils.messageDialog("Error refreshing editor", getClass(), "Could not refresh this editor", e);
521 522
            }
522 523
        }
523 524
    }

Also available in: Unified diff