Revision b5b429af
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/e4/handler/CreateConceptRelationHandlerE4.java | ||
---|---|---|
17 | 17 |
import org.eclipse.e4.core.di.annotations.CanExecute; |
18 | 18 |
import org.eclipse.e4.core.di.annotations.Execute; |
19 | 19 |
import org.eclipse.e4.core.di.annotations.Optional; |
20 |
import org.eclipse.e4.ui.di.UISynchronize; |
|
20 | 21 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
21 | 22 |
import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem; |
22 | 23 |
import org.eclipse.e4.ui.services.IServiceConstants; |
... | ... | |
48 | 49 |
@Execute |
49 | 50 |
public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart, |
50 | 51 |
@Optional@Named(IServiceConstants.ACTIVE_SHELL) Shell shell, |
51 |
MHandledMenuItem menuItem) { |
|
52 |
MHandledMenuItem menuItem, |
|
53 |
UISynchronize sync) { |
|
52 | 54 |
|
53 | 55 |
String commandId = menuItem.getCommand().getElementId(); |
54 | 56 |
UUID uuid = (UUID) menuItem.getTransientData().get(commandId+".taxonRelationshipType.uuid"); |
... | ... | |
90 | 92 |
|
91 | 93 |
AbstractPostOperation operation = new CreateConceptRelationOperation(menuItem.getLocalizedLabel(), |
92 | 94 |
undoContext, taxon, relatedConcept, typeInverseContainer, conceptView); |
93 |
AbstractUtility.executeOperation(operation); |
|
95 |
AbstractUtility.executeOperation(operation, sync);
|
|
94 | 96 |
} |
95 | 97 |
} |
96 | 98 |
|
Also available in: Unified diff
ref #6925 Inject context into operations to allow sync/async execution