Revision b5b429af
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/e4/handler/CreateSiblingNodeHandlerE4.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import org.eclipse.core.commands.operations.IUndoContext; |
6 | 6 |
import org.eclipse.e4.core.di.annotations.Execute; |
7 |
import org.eclipse.e4.ui.di.UISynchronize; |
|
7 | 8 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
8 | 9 |
import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem; |
9 | 10 |
import org.eclipse.e4.ui.services.IServiceConstants; |
... | ... | |
27 | 28 |
|
28 | 29 |
@Execute |
29 | 30 |
public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart, |
30 |
@Named(IServiceConstants.ACTIVE_SELECTION) IStructuredSelection selection, MHandledMenuItem menuItem) { |
|
31 |
@Named(IServiceConstants.ACTIVE_SELECTION) IStructuredSelection selection, MHandledMenuItem menuItem, |
|
32 |
UISynchronize sync) { |
|
31 | 33 |
|
32 | 34 |
PolytomousKeyListEditorE4 editor = (PolytomousKeyListEditorE4) activePart.getObject(); |
33 | 35 |
|
... | ... | |
38 | 40 |
|
39 | 41 |
AbstractPostOperation operation = new CreateNodeOperation(label, undoContext, keyNode.getParent(), |
40 | 42 |
editor); |
41 |
AbstractUtility.executeOperation(operation); |
|
43 |
AbstractUtility.executeOperation(operation, sync);
|
|
42 | 44 |
} |
43 | 45 |
} |
Also available in: Unified diff
ref #6925 Inject context into operations to allow sync/async execution