Revision b5b429af
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/CreateMisapplicationHandlerE4.java | ||
---|---|---|
13 | 13 |
|
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; |
... | ... | |
38 | 39 |
|
39 | 40 |
@Execute |
40 | 41 |
public void execute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart, |
41 |
MHandledMenuItem menuItem) { |
|
42 |
MHandledMenuItem menuItem, |
|
43 |
UISynchronize sync) { |
|
42 | 44 |
|
43 | 45 |
TaxonNameEditorE4 editor = (TaxonNameEditorE4) activePart.getObject(); |
44 | 46 |
|
... | ... | |
50 | 52 |
AbstractPostOperation<?> operation; |
51 | 53 |
operation = new CreateConceptRelationOperation(menuItem.getLocalizedLabel(), |
52 | 54 |
editor.getUndoContext(), editor.getTaxon(), concept, type, editor); |
53 |
AbstractUtility.executeOperation(operation); |
|
55 |
AbstractUtility.executeOperation(operation, sync);
|
|
54 | 56 |
} |
55 | 57 |
|
56 | 58 |
|
Also available in: Unified diff
ref #6925 Inject context into operations to allow sync/async execution