import org.eclipse.core.runtime.IProgressMonitor;\r
import org.eclipse.core.runtime.IStatus;\r
import org.eclipse.core.runtime.Status;\r
+import org.eclipse.jface.dialogs.MessageDialog;\r
\r
+import eu.etaxonomy.cdm.api.service.DeleteResult;\r
import eu.etaxonomy.cdm.api.service.ITermService;\r
import eu.etaxonomy.cdm.api.service.IVocabularyService;\r
import eu.etaxonomy.cdm.api.service.exception.DataChangeNoRollbackException;\r
\r
definedEditorInput.getVocabularies().remove((TermVocabulary)termBase); \r
\r
- String result = CdmStore.getService(IVocabularyService.class).delete((TermVocabulary)termBase);\r
- \r
+ DeleteResult result = CdmStore.getService(IVocabularyService.class).delete((TermVocabulary)termBase);\r
+ if (result.isError()){\r
+ //TODO: Error message!\r
+ }\r
\r
} else if (termBase instanceof DefinedTermBase) {\r
\r
vocabulary.removeTerm(definedTermBase);\r
}\r
\r
- String result = CdmStore.getService(ITermService.class).delete((DefinedTermBase)termBase);\r
+ DeleteResult result = CdmStore.getService(ITermService.class).delete((DefinedTermBase)termBase);\r
\r
+ if (result.isError()){\r
+ MessageDialog.openError(null, "Delete failed", result.getExceptions().get(0).getMessage());\r
+ }\r
}\r
\r
return postExecute(termBase);\r