- adapted sub classes of AbstractPostOperation
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / view / descriptive / operation / DeleteTaxonDescriptionOperation.java
index fa8c8762ac494f211f3764ba5e7e2642d8042b7b..daa0394da86657dbd3e1e415358c7b98ceef4b1c 100644 (file)
@@ -1,8 +1,8 @@
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -28,8 +28,8 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
  * @version 1.0
  */
 public class DeleteTaxonDescriptionOperation extends AbstractPostTaxonOperation {
-       
-       private TaxonDescription description;
+
+       private final TaxonDescription description;
 
        /**
         * <p>Constructor for DeleteTaxonDescriptionOperation.</p>
@@ -42,9 +42,9 @@ public class DeleteTaxonDescriptionOperation extends AbstractPostTaxonOperation
        public DeleteTaxonDescriptionOperation(String label, IUndoContext undoContext,
                        TaxonDescription description, IPostOperationEnabled postOperationEnabled) {
                super(label, undoContext, postOperationEnabled);
-               
+
                this.description = description;
-               taxon = description.getTaxon();
+               element = description.getTaxon();
        }
 
        /* (non-Javadoc)
@@ -56,7 +56,7 @@ public class DeleteTaxonDescriptionOperation extends AbstractPostTaxonOperation
                        throws ExecutionException {
 
                monitor.worked(20);
-               taxon.removeDescription(description);
+               element.removeDescription(description);
                monitor.worked(40);
 
                return postExecute(description);
@@ -80,8 +80,8 @@ public class DeleteTaxonDescriptionOperation extends AbstractPostTaxonOperation
        public IStatus undo(IProgressMonitor monitor, IAdaptable info)
                        throws ExecutionException {
 
-               taxon.addDescription(description);
-               
+           element.addDescription(description);
+
                return postExecute(null);
        }
 }