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