DeleteResult handling in DeleteSynonymOperation
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / MultiPageTaxonEditor.java
index 207b5d2f031da8a784189d35170f4b1e942ba22c..a55a03de33824865111ca34a73e4c317c899628a 100644 (file)
@@ -37,6 +37,8 @@ import eu.etaxonomy.taxeditor.model.DataChangeBridge;
 import eu.etaxonomy.taxeditor.model.IDataChangeBehavior;
 import eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider;
 import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
+import eu.etaxonomy.taxeditor.model.IPartContentHasFactualData;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 
 /**
@@ -50,7 +52,7 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
  * @version 1.0
  */
 public class MultiPageTaxonEditor extends FormEditor implements
-               IConversationEnabled, IPostOperationEnabled,
+        IPartContentHasFactualData, IConversationEnabled, IPostOperationEnabled,
                IDirtyMarkableSelectionProvider, IPartContentHasDetails, ISecuredEditor {
 
        /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.taxon"{trunked}</code> */
@@ -108,7 +110,7 @@ public class MultiPageTaxonEditor extends FormEditor implements
                        // EditorUtil.showPropertySheet();
 
                } catch (PartInitException e) {
-                       AbstractUtility.error(getClass(), e);
+                       MessagingUtils.error(getClass(), e);
                }
        }
 
@@ -141,11 +143,10 @@ public class MultiPageTaxonEditor extends FormEditor implements
                        monitor.worked(1);
 
             this.setDirty(false);
-            monitor.worked(1);
+            monitor.worked(1);            
         } catch (Exception e) {
             setFocus();
-            AbstractUtility.errorDialog("An error occurred while saving", getClass(),
-                    "An error occurred while saving the editor. Please close and reopen the taxon again.", e);
+            MessagingUtils.operationDialog(this, e, "saving a taxon", " Please close and reopen the taxon again.");
             disableEditor(true);
         } finally {
             monitor.done();
@@ -416,10 +417,10 @@ public class MultiPageTaxonEditor extends FormEditor implements
             if (editor instanceof IPostOperationEnabled) {
                 ((IPostOperationEnabled) editor).postOperation(objectAffectedByOperation);
             } else {
-                AbstractUtility.warn(getClass(), "postOperation not enabled for editor " + editor);
+                MessagingUtils.warn(getClass(), "postOperation not enabled for editor " + editor);
             }
         }
-        AbstractUtility.warn(getClass(), "postOperation called on MultiPageTaxonEditor. Can you make it more specific?");
+        MessagingUtils.warn(getClass(), "postOperation called on MultiPageTaxonEditor. Can you make it more specific?");
 
         return false;
     }
@@ -499,7 +500,7 @@ public class MultiPageTaxonEditor extends FormEditor implements
      */
     public void reload() {
         if (isDirty()) {
-            AbstractUtility.warningDialog("Editor has unsaved data", getClass(), "This editor can not be "
+            MessagingUtils.warningDialog("Editor has unsaved data", getClass(), "This editor can not be "
                     + "refreshed because it contains unsaved data. Refreshing "
                     + "this editor would discard the changes. Please save this editor, "
                     + "close and reopen it manually in order to get the latest content");
@@ -517,7 +518,7 @@ public class MultiPageTaxonEditor extends FormEditor implements
                     editorPart.redraw();
                 }
             } catch (Exception e) {
-                AbstractUtility.errorDialog("Error refreshing editor", getClass(), "Could not refresh this editor", e);
+                MessagingUtils.messageDialog("Error refreshing editor", getClass(), "Could not refresh this editor", e);
             }
         }
     }