Revision 8336cf65
Added by Katja Luther over 8 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteSynonymOperation.java | ||
---|---|---|
16 | 16 |
import org.eclipse.core.runtime.IAdaptable; |
17 | 17 |
import org.eclipse.core.runtime.IProgressMonitor; |
18 | 18 |
import org.eclipse.core.runtime.IStatus; |
19 |
import org.eclipse.jface.dialogs.MessageDialog; |
|
20 | 19 |
|
21 | 20 |
import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration; |
22 | 21 |
import eu.etaxonomy.cdm.api.service.DeleteResult; |
... | ... | |
24 | 23 |
import eu.etaxonomy.cdm.model.taxon.Synonym; |
25 | 24 |
import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType; |
26 | 25 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
26 |
import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin; |
|
27 |
import eu.etaxonomy.taxeditor.model.DeleteResultMessagingUtils; |
|
27 | 28 |
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation; |
28 | 29 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; |
29 | 30 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
... | ... | |
81 | 82 |
|
82 | 83 |
DeleteResult result = service.deleteSynonym(synonym.getUuid(), element.getUuid(), null); |
83 | 84 |
if (result.isError()){ |
84 |
MessageDialog.openError(null, "Delete failed", result.toString());
|
|
85 |
DeleteResultMessagingUtils.messageDialogWithDetails(result, "Delete failed", TaxeditorEditorPlugin.PLUGIN_ID);
|
|
85 | 86 |
} else if (!result.getUpdatedObjects().isEmpty()){ |
86 |
MessageDialog.openInformation(null, "Delete successfull", "The Synonym could be deleted, but there is an updated object: " + result.toString());
|
|
87 |
DeleteResultMessagingUtils.messageDialogWithDetails(result, "The Synonym could be deleted, but related object(s) could not be deleted", TaxeditorEditorPlugin.PLUGIN_ID);
|
|
87 | 88 |
} |
88 | 89 |
} |
89 | 90 |
// taxon.removeSynonym(synonym); |
Also available in: Unified diff
improve messaging for deleteresults