(no commit message)
authorKatja Luther <k.luther@bgbm.org>
Tue, 16 Sep 2014 07:26:45 +0000 (07:26 +0000)
committerKatja Luther <k.luther@bgbm.org>
Tue, 16 Sep 2014 07:26:45 +0000 (07:26 +0000)
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/operation/DeleteOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/DeleteOperation.java

index 59001c82a44e2a50680d99f55e81b19c31a1f027..7c8b588be75036e4012655907dba6e5ff7cb158b 100644 (file)
@@ -58,8 +58,8 @@ public class DeleteOperation extends AbstractPersistentPostOperation {
                if (result.isError()){
                        MessageDialog.openError(null, "Delete failed", result.getExceptions().get(0).getMessage());
                        
-               }else if(!result.getExceptions().isEmpty()){
-                       //TODO:Warning!
+               }else if(result.isAbort()){
+                       MessageDialog.openWarning(null, "Delete abort", "The object could not be deleted, maybe there was no object selected.");
                }
                
                return postExecute(null);
index 32286abb524fe700d7033de9aa6d5ce65599327b..743cb775ea135bb417ec3f06e82937935740295a 100644 (file)
@@ -114,7 +114,7 @@ public class DeleteOperation extends AbstractPersistentPostOperation{
                                                return null;
                                        }
                                }*/
-
+                               
                                DeleteResult result = CdmStore.getService(IClassificationService.class).delete(taxonomicTree);
                                if (result.isError()){
                                        //TODO:Error message!
@@ -129,7 +129,12 @@ public class DeleteOperation extends AbstractPersistentPostOperation{
                                        }
                                }*/
                        } else {
-                               service.deleteTaxonNodes(treeNodes, config);
+                               
+                               DeleteResult result =service.deleteTaxonNodes(treeNodes, config);
+                               if (result.isError()){
+                                       //TODO:Error message!
+                                       MessageDialog.openError(null, "Delete failed", result.getExceptions().get(0).getMessage());
+                               }
                        }
 
                monitor.worked(40);