import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", null, "Do you really want to delete the name?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
int result_dialog= dialog.open();
- if (result_dialog == 1){
+ if (result_dialog != Status.OK){
return null;
}
result = service.delete(((TaxonNameBase) object).getUuid(), config);
if (((Taxon)object).getTaxonNodes().isEmpty()){
dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", null, "Do you really want to delete the taxon?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
int result_dialog= dialog.open();
- if (result_dialog == 1){
+ if (result_dialog != Status.OK){
return null;
}
result = service.deleteTaxon(((TaxonBase) object).getUuid(), config, null);
SynonymDeletionConfigurator config = new SynonymDeletionConfigurator();
DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", null, "Do you really want to delete the synonym?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
int result_dialog= dialog.open();
- if (result_dialog == 1){
+ if (result_dialog != Status.OK){
return null;
}
result = service.deleteSynonym(((Synonym)object).getUuid(), config);