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/SwapSynonymAndAcceptedHandlerE4.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;
......
49 50
    @Execute
50 51
    public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart,
51 52
            @Named(IServiceConstants.ACTIVE_SELECTION) IStructuredSelection selection,
52
            @Named(IServiceConstants.ACTIVE_SHELL) Shell shell, MHandledMenuItem menuItem, EPartService partService) {
53
            @Named(IServiceConstants.ACTIVE_SHELL) Shell shell, MHandledMenuItem menuItem, EPartService partService,
54
            UISynchronize sync) {
53 55

  
54 56
        this.activePart = activePart;
55 57
        this.partService = partService;
......
66 68
        SwapSynonymAndAcceptedOperation operation = new SwapSynonymAndAcceptedOperation(menuItem.getLocalizedLabel(),
67 69
                editor.getUndoContext(), editor.getTaxon(), synonym, this, editor.getEditorInput());
68 70

  
69
        AbstractUtility.executeOperation(operation);
71
        AbstractUtility.executeOperation(operation, sync);
70 72

  
71 73
    }
72 74

  

Also available in: Unified diff