From: Katja Luther Date: Wed, 3 Jun 2015 13:19:59 +0000 (+0000) Subject: delete taxonnode if taxon is used somewhere else fixed X-Git-Tag: 3.6.0~16 X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/2a1140d92cb753bd25a273e75a7067b9c9435e0a delete taxonnode if taxon is used somewhere else fixed --- diff --git a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/DeleteOperation.java b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/DeleteOperation.java index ad739203d..047142041 100644 --- a/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/DeleteOperation.java +++ b/eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/DeleteOperation.java @@ -104,6 +104,13 @@ public class DeleteOperation extends AbstractPersistentPostOperation{ if (result.isError() && !result.getExceptions().isEmpty()){ //TODO:Error message! MessageDialog.openError(null, "Delete failed", result.getExceptions().iterator().next().getMessage()); + } else if (!result.getExceptions().isEmpty()){ + String separator = ", "; + String exceptionString = ""; + for (Exception exception : result.getExceptions()) { + exceptionString += exception.getLocalizedMessage()+separator; + } + MessageDialog.openInformation(null, "Delete of the node was successful but the taxon could not be deleted.", exceptionString); }