}else{
if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(configNodes, HandlerUtil.getActiveShell(event), "Confirm Deletion", "Do you really want to delete the selected node?")){
return null;
- }
+ }
config.setTaxonNodeConfig(configNodes);
}
}
} catch (NotDefinedException e) {
MessagingUtils.warn(getClass(), "Command name not set");
+ } catch (Exception e){
+ MessagingUtils.error(getClass(), e);
}
} else{
try{
}
}catch (NotDefinedException e) {
MessagingUtils.warn(getClass(), "Command name not set");
- }
+ } catch (Exception e){
+ MessagingUtils.error(getClass(), e);
+ }
}
return null;
}
import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.store.CdmStore;
} else if (!result.getExceptions().isEmpty()){
String separator = ", ";
String exceptionString = "";
+ int count = 1;
for (Exception exception : result.getExceptions()) {
- exceptionString += exception.getLocalizedMessage()+separator;
+ exceptionString += exception.getLocalizedMessage();
+ if (count < result.getExceptions().size()){
+ exceptionString += separator;
+ }
}
- MessageDialog.openInformation(null, "Delete of the node was successful but the taxon could not be deleted.", exceptionString);
+ MessagingUtils.informationDialog("Delete of the node was successful but the taxon could not be deleted.", exceptionString);
}
DeleteResult result = CdmStore.getService(IClassificationService.class).delete(taxonomicTree);
if (result.isError() && !result.getExceptions().isEmpty()){
- //TODO:Error message!
- MessageDialog.openError(null, "Delete failed", result.getExceptions().iterator().next().getMessage());
+ String separator = ", ";
+ String exceptionString = "";
+ for (Exception exception : result.getExceptions()) {
+ exceptionString += exception.getLocalizedMessage()+separator;
+ }
+ MessagingUtils.error(null, exceptionString, result.getExceptions().iterator().next());
}
/*}else{
DeleteResult result =service.deleteTaxonNodes(treeNodes, config);
if (result.isError() && !result.getExceptions().isEmpty()){
- //TODO:Error message!
- MessageDialog.openError(null, "Delete failed", result.getExceptions().iterator().next().getMessage());
+ String separator = ", ";
+ String exceptionString = "";
+ for (Exception exception : result.getExceptions()) {
+ exceptionString += exception.getLocalizedMessage()+separator;
+ }
+ MessagingUtils.error(null, exceptionString, result.getExceptions().iterator().next());
}
}