refactoring actions in the treeviewer
[taxeditor.git] / eclipseprojects / eu.etaxonomy.taxeditor / src / eu / etaxonomy / taxeditor / operations / DeleteTaxonOperation.java
index e815ad14b3aa0afd2f69e464be3cc6832062ee57..8cd2daf90f5b65cc1ae595dffc82bebc9c8fec9b 100644 (file)
@@ -11,7 +11,6 @@ package eu.etaxonomy.taxeditor.operations;
 \r
 import org.apache.log4j.Logger;\r
 import org.eclipse.core.commands.ExecutionException;\r
-import org.eclipse.core.commands.operations.AbstractOperation;\r
 import org.eclipse.core.commands.operations.IUndoContext;\r
 import org.eclipse.core.runtime.IAdaptable;\r
 import org.eclipse.core.runtime.IProgressMonitor;\r
@@ -25,14 +24,28 @@ import eu.etaxonomy.taxeditor.UiUtil;
 import eu.etaxonomy.taxeditor.model.CdmSessionDataRepository;\r
 \r
 /**\r
+ * Delete a taxon from the model.\r
+ * \r
+ * TODO: Currently all data in session data repository has to be saved before deleting \r
+ * a taxon and the whole logic is happening here. This way we would have to implement \r
+ * the same logic in another place if we want to delete outside of an operation context\r
+ * (NOT undoable). Therefore it is desirable to have the logic implemented in another \r
+ * place and merely call a method here.\r
+ * \r
  * @author n.hoffmann\r
  * @created 16.01.2009\r
  * @version 1.0\r
  */\r
 public class DeleteTaxonOperation extends AbstractEditorOperation {\r
+       \r
+       @SuppressWarnings("unused")\r
        private static Logger logger = Logger.getLogger(DeleteTaxonOperation.class);\r
 \r
+       /**\r
+        * The taxonomical parent of the taxon to be deleted.\r
+        */\r
        private Taxon parentTaxon;\r
+       \r
        public DeleteTaxonOperation(String text, IUndoContext undoContext,\r
                        Taxon taxon) {\r
                super(text, undoContext, taxon);\r