Revision b5b429af
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/CopyHandlerE4.java | ||
---|---|---|
13 | 13 |
import org.eclipse.core.runtime.IStatus; |
14 | 14 |
import org.eclipse.e4.core.di.annotations.CanExecute; |
15 | 15 |
import org.eclipse.e4.core.di.annotations.Execute; |
16 |
import org.eclipse.e4.ui.di.UISynchronize; |
|
16 | 17 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
17 | 18 |
import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem; |
18 | 19 |
import org.eclipse.e4.ui.services.IServiceConstants; |
... | ... | |
37 | 38 |
@Execute |
38 | 39 |
public void execute(@Named(IServiceConstants.ACTIVE_SELECTION)TreeSelection selection, |
39 | 40 |
@Named(IServiceConstants.ACTIVE_PART)MPart activePart, |
40 |
MHandledMenuItem menuItem) { |
|
41 |
MHandledMenuItem menuItem, |
|
42 |
UISynchronize sync) { |
|
41 | 43 |
|
42 | 44 |
TaxonNavigatorE4 taxonNavigator = (TaxonNavigatorE4) activePart.getObject(); |
43 | 45 |
|
... | ... | |
46 | 48 |
if (selectedObject instanceof TaxonNode) { |
47 | 49 |
AbstractPostOperation operation = new CopyOperation(menuItem.getLocalizedLabel(), StoreUtil.getUndoContext(), |
48 | 50 |
(TaxonNode)selectedObject, taxonNavigator); |
49 |
IStatus status = AbstractUtility.executeOperation(operation); |
|
51 |
IStatus status = AbstractUtility.executeOperation(operation, sync);
|
|
50 | 52 |
} |
51 | 53 |
} |
52 | 54 |
} |
Also available in: Unified diff
ref #6925 Inject context into operations to allow sync/async execution