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/ChangeToSynonymHandlerE4.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

  
......
47 49
		operation = new ChangeConceptToSynonymOperation(menuItem.getLocalizedLabel(),
48 50
        		editor.getUndoContext(), editor.getTaxon(), concept, null, editor);
49 51

  
50
        AbstractUtility.executeOperation(operation);
52
        AbstractUtility.executeOperation(operation, sync);
51 53

  
52 54
	}
53 55

  

Also available in: Unified diff