- added option for deep delete (with children) to DerivateEditor
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / view / derivate / operation / DeleteDerivateOperation.java
index 678b43e4089603b4e7453f52ef5abb1e6562b858..78afd7c0a319cda57508054eb130834b2f7ad8ac 100644 (file)
@@ -60,7 +60,12 @@ public class DeleteDerivateOperation extends AbstractPostOperation<CdmBase> {
     @Override
     public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
         if(getPostOperationEnabled() instanceof ISaveablePart){
-            if(!MessagingUtils.confirmDialog("Confirm deletion", "Do you really want to delete the selected element?")){
+            String confirmationQuestion = "Do you really want to delete the selected element";
+            if(deleteConfigurator.isDeleteChildren()){
+                confirmationQuestion += " and its children";
+            }
+            confirmationQuestion += "?";
+            if(!MessagingUtils.confirmDialog("Confirm deletion", confirmationQuestion)){
                 return Status.CANCEL_STATUS;
             }
             if(((ISaveablePart) getPostOperationEnabled()).isDirty()){