Revision ae55584a
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/DeleteTaxonBaseHandler.java | ||
---|---|---|
13 | 13 |
import org.eclipse.core.commands.ExecutionException; |
14 | 14 |
import org.eclipse.core.commands.IHandler; |
15 | 15 |
import org.eclipse.core.commands.common.NotDefinedException; |
16 |
import org.eclipse.ui.IWorkbenchPage; |
|
17 | 16 |
import org.eclipse.ui.handlers.HandlerUtil; |
18 | 17 |
|
19 | 18 |
import eu.etaxonomy.cdm.api.service.DeleteResult; |
... | ... | |
69 | 68 |
} catch (NotDefinedException e) { |
70 | 69 |
MessagingUtils.error(getClass(), e); |
71 | 70 |
} |
72 |
IWorkbenchPage activePage = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage(); |
|
73 | 71 |
if (selectedElement instanceof TaxonBase){ |
74 | 72 |
if (((TaxonBase)selectedElement).getId() == 0){ |
75 | 73 |
if (selectedElement instanceof Taxon && ((Taxon) selectedElement).isMisapplication()) { |
... | ... | |
91 | 89 |
if(! DeleteConfiguratorDialog.openConfirmWithConfigurator(deleteConfig, HandlerUtil.getActiveShell(event), Messages.DeleteTaxonBaseHandler_CONFIRM_DELETION, Messages.DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM)){ |
92 | 90 |
return ; |
93 | 91 |
} |
94 |
operation = new DeleteSynonymOperation(commandName, editor.getUndoContext(), deleteConfig, activePage, editor.getTaxon(), (Synonym) selectedElement,this, editor, (ICdmEntitySessionEnabled)editor.getEditorInput());
|
|
92 |
operation = new DeleteSynonymOperation(commandName, editor.getUndoContext(), deleteConfig, editor.getTaxon(), (Synonym) selectedElement,this, editor, (ICdmEntitySessionEnabled)editor.getEditorInput()); |
|
95 | 93 |
|
96 | 94 |
} |
97 | 95 |
// misapplication |
... | ... | |
100 | 98 |
if(! DeleteConfiguratorDialog.openConfirmWithConfigurator(deleteConfig, HandlerUtil.getActiveShell(event), Messages.DeleteTaxonBaseHandler_CONFIRM_DELETION, Messages.DeleteTaxonBaseHandler_REALLY_DELETE_MISAPPLICATION)){ |
101 | 99 |
return ; |
102 | 100 |
} |
103 |
operation = new DeleteMisapplicationOperation(commandName, editor.getUndoContext(), deleteConfig, activePage, editor.getTaxon(), (Taxon) selectedElement,this, editor, (ICdmEntitySessionEnabled)editor.getEditorInput());
|
|
101 |
operation = new DeleteMisapplicationOperation(commandName, editor.getUndoContext(), deleteConfig, editor.getTaxon(), (Taxon) selectedElement,this, editor, (ICdmEntitySessionEnabled)editor.getEditorInput()); |
|
104 | 102 |
} else { |
105 | 103 |
throw new IllegalArgumentException(Messages.DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT); |
106 | 104 |
} |
Also available in: Unified diff
ref #6595 remove unused parameter