Revision b5b429af
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/MoveTaxonHandlerE4.java | ||
---|---|---|
20 | 20 |
|
21 | 21 |
import org.eclipse.e4.core.di.annotations.CanExecute; |
22 | 22 |
import org.eclipse.e4.core.di.annotations.Execute; |
23 |
import org.eclipse.e4.ui.di.UISynchronize; |
|
23 | 24 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
24 | 25 |
import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem; |
25 | 26 |
import org.eclipse.e4.ui.services.IServiceConstants; |
... | ... | |
56 | 57 |
@Execute |
57 | 58 |
public void execute(@Named(IServiceConstants.ACTIVE_SELECTION)TreeSelection selection, |
58 | 59 |
@Named(IServiceConstants.ACTIVE_SHELL)Shell shell, |
59 |
@Named(IServiceConstants.ACTIVE_PART)MPart activePart, EPartService partService) { |
|
60 |
@Named(IServiceConstants.ACTIVE_PART)MPart activePart, EPartService partService, |
|
61 |
UISynchronize sync) { |
|
60 | 62 |
|
61 | 63 |
TaxonNavigatorE4 taxonNavigator = (TaxonNavigatorE4) activePart.getObject(); |
62 | 64 |
|
... | ... | |
97 | 99 |
|
98 | 100 |
AbstractPostOperation<?> operation = new MoveTaxonOperation |
99 | 101 |
(Messages.MoveTaxonHandler_MOVE_TO_PARENT, NavigationUtil.getUndoContext(), taxonNodeUUIDs, parentTaxonNode, taxonNavigator, taxonNavigator, moveToNewParent); //$NON-NLS-1$ |
100 |
AbstractUtility.executeOperation(operation); |
|
102 |
AbstractUtility.executeOperation(operation, sync);
|
|
101 | 103 |
taxonNavigator.refresh(); |
102 | 104 |
|
103 | 105 |
} |
Also available in: Unified diff
ref #6925 Inject context into operations to allow sync/async execution