Project

General

Profile

« Previous | Next » 

Revision b5b429af

Added by Patrick Plitzner over 6 years ago

ref #6925 Inject context into operations to allow sync/async execution

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/SetBasionymHandlerE4.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;
......
36 37
    @Execute
37 38
    public void execute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart,
38 39
            @Named(IServiceConstants.ACTIVE_SELECTION)IStructuredSelection selection,
39
            MHandledMenuItem menuItem) {
40
            MHandledMenuItem menuItem,
41
            UISynchronize sync) {
40 42

  
41 43
        TaxonNameEditorE4 editor = (TaxonNameEditorE4) activePart.getObject();
42 44

  
......
46 48

  
47 49
		operation = new ChangeHomotypicalGroupBasionymOperation(menuItem.getLocalizedLabel(), editor.getUndoContext(),
48 50
        					editor.getTaxon(), selectedTaxonBase, editor);
49
        AbstractUtility.executeOperation(operation);
51
        AbstractUtility.executeOperation(operation, sync);
50 52
	}
51 53

  
52 54
    @CanExecute

Also available in: Unified diff