refactoring actions in the treeviewer
[taxeditor.git] / eclipseprojects / eu.etaxonomy.taxeditor / src / eu / etaxonomy / taxeditor / operations / name / ChangeHomotypicGroupOperation.java
index b59079a3d59435a08d742f8408ffd52d0400e159..39bcaf7bd49995314b714e7b84e74f564ebf5a25 100644 (file)
@@ -15,23 +15,37 @@ import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.core.runtime.IAdaptable;\r
 import org.eclipse.core.runtime.IProgressMonitor;\r
 import org.eclipse.core.runtime.IStatus;\r
-import org.eclipse.core.runtime.Status;\r
 \r
 import eu.etaxonomy.cdm.model.name.HomotypicalGroup;\r
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
 import eu.etaxonomy.cdm.model.taxon.Synonym;\r
 import eu.etaxonomy.cdm.model.taxon.Taxon;\r
-import eu.etaxonomy.taxeditor.UiUtil;\r
-import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;\r
 import eu.etaxonomy.taxeditor.operations.AbstractEditorOperation;\r
 \r
+/**\r
+ * Change a the homotypical group for a given synonym.\r
+ * \r
+ * @author n.hoffmann\r
+ * @created 19.01.2009\r
+ * @version 1.0\r
+ */\r
 public class ChangeHomotypicGroupOperation extends AbstractEditorOperation {\r
        \r
+       @SuppressWarnings("unused")\r
        private static final Logger logger = Logger\r
                        .getLogger(ChangeHomotypicGroupOperation.class);\r
 \r
+       /**\r
+        * The synonym to be moved.\r
+        */\r
        private Synonym synonym; \r
+       /**\r
+        * The former homotypical group the synonym belonged to\r
+        */\r
        private HomotypicalGroup oldHomotypicalGroup;\r
+       /**\r
+        * The homotypical group the synonym is to be moved to\r
+        */\r
        private HomotypicalGroup newHomotypicalGroup;\r
        \r
        public ChangeHomotypicGroupOperation(String label, IUndoContext undoContext, \r
@@ -48,7 +62,9 @@ public class ChangeHomotypicGroupOperation extends AbstractEditorOperation {
                this.newHomotypicalGroup = newHomotypicalGroup;\r
        }\r
 \r
-\r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
        @Override\r
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)\r
                        throws ExecutionException {\r
@@ -66,12 +82,18 @@ public class ChangeHomotypicGroupOperation extends AbstractEditorOperation {
                return redrawOpenEditor();\r
        }\r
 \r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
        @Override\r
        public IStatus redo(IProgressMonitor monitor, IAdaptable info)\r
                        throws ExecutionException {\r
                return execute(monitor, info);\r
        }\r
 \r
+       /* (non-Javadoc)\r
+        * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)\r
+        */\r
        @Override\r
        public IStatus undo(IProgressMonitor monitor, IAdaptable info)\r
                        throws ExecutionException {\r