(no commit message)
[taxeditor.git] / taxeditor-store / src / main / java / eu / etaxonomy / taxeditor / operations / DeleteTaxonNodeOperation.java
index 5d3e298bdc5d73959c47d20d523dd59af416e651..7415ebbbe580f60024079588395da2868cc71aba 100644 (file)
@@ -35,6 +35,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @created 16.01.2009\r
  * @version 1.0\r
  */\r
+@Deprecated\r
 public class DeleteTaxonNodeOperation extends AbstractPersistentPostOperation{\r
        \r
        @SuppressWarnings("unused")\r
@@ -66,8 +67,10 @@ public class DeleteTaxonNodeOperation extends AbstractPersistentPostOperation{
                        taxonName = taxon.getName().getTitleCache();\r
                }\r
                \r
+               String childWarning = taxonNode.getChildNodes().size() > 0 ? "and all included taxa" : "";\r
+               \r
                // Prompt user for confirmation\r
-               if(! MessageDialog.openConfirm((Shell) info.getAdapter(Shell.class), "Confirm Deletion", "Are you sure you want to delete taxon '" + taxonName + "' from this taxonomic view?")){\r
+               if(! MessageDialog.openConfirm((Shell) info.getAdapter(Shell.class), "Confirm Deletion", "Are you sure you want to delete taxon '" + taxonName + "' " + childWarning + " from this taxonomic view?")){\r
                        monitor.done();\r
                        return Status.CANCEL_STATUS;\r
                }\r
@@ -75,13 +78,13 @@ public class DeleteTaxonNodeOperation extends AbstractPersistentPostOperation{
                \r
                // If the taxon node has child nodes, cancel operation\r
                // TODO add option to continue, and delete children\r
-               if (taxonNode.getChildNodes().size() > 0) {\r
-                       MessageDialog.openInformation((Shell) info.getAdapter(Shell.class), "Cannot delete taxon", \r
-                                       "'" + taxonName + "' has taxonomic children. " +\r
-                                       "These must be manually deleted before their parent.");\r
-                       monitor.done();\r
-                       return Status.CANCEL_STATUS;\r
-               }\r
+//             if (taxonNode.getChildNodes().size() > 0) {\r
+//                     MessageDialog.openInformation((Shell) info.getAdapter(Shell.class), "Cannot delete taxon", \r
+//                                     "'" + taxonName + "' has taxonomic children. " +\r
+//                                     "These must be manually deleted before their parent.");\r
+//                     monitor.done();\r
+//                     return Status.CANCEL_STATUS;\r
+//             }\r
                \r
                taxonNode.delete();\r
                \r