* @created 16.01.2009\r
* @version 1.0\r
*/\r
+@Deprecated\r
public class DeleteTaxonNodeOperation extends AbstractPersistentPostOperation{\r
\r
@SuppressWarnings("unused")\r
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
\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