import org.eclipse.core.commands.operations.IUndoableOperation;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PartInitException;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.dialogs.filteredSelection.FilteredTaxonNodeSelectionDialog;
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
import eu.etaxonomy.taxeditor.operations.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.operations.MoveTaxonOperation;
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
public Object execute(ExecutionEvent event) throws ExecutionException {
+ TaxonNavigator taxonNavigator;
+ try {
+ taxonNavigator = (TaxonNavigator) NavigationUtil.getView(TaxonNavigator.ID);
+ } catch (PartInitException e) {
+ logger.error(e);
+ throw new RuntimeException(e);
+ }
+
Shell shell = NavigationUtil.getShell();
TaxonNode taxonNode = (TaxonNode) NavigationUtil.getCurrentSelection(event);
IUndoableOperation operation = new MoveTaxonOperation
("Move taxon to new parent", NavigationUtil.getUndoContext(),
- taxonNode, parentTaxonNode, this); //$NON-NLS-1$
+ taxonNode, parentTaxonNode, this, taxonNavigator); //$NON-NLS-1$
NavigationUtil.executeOperation(operation);
}