Revision b5b429af
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/operation/e4/RemotingCdmHandlerE4.java | ||
---|---|---|
13 | 13 |
import org.eclipse.core.commands.operations.AbstractOperation; |
14 | 14 |
import org.eclipse.core.runtime.IStatus; |
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; |
... | ... | |
42 | 43 |
public void execute(@Named(IServiceConstants.ACTIVE_SELECTION)IStructuredSelection selection, |
43 | 44 |
@Named(IServiceConstants.ACTIVE_SHELL)Shell shell, |
44 | 45 |
@Named(IServiceConstants.ACTIVE_PART)MPart activePart, |
45 |
MHandledMenuItem menuItem, EPartService partService) { |
|
46 |
MHandledMenuItem menuItem, EPartService partService, UISynchronize sync) {
|
|
46 | 47 |
this.partService = partService; |
47 | 48 |
IStatus allowStatus = allowOperations(selection, shell, activePart, menuItem); |
48 | 49 |
if(allowStatus.isOK()) { |
49 | 50 |
AbstractOperation op = prepareOperation(selection, shell, activePart, menuItem); |
50 | 51 |
if(op != null) { |
51 |
AbstractUtility.executeOperation(op, this); |
|
52 |
AbstractUtility.executeOperation(op, this, sync);
|
|
52 | 53 |
} |
53 | 54 |
} else if(allowStatus.getSeverity() == IStatus.ERROR || |
54 | 55 |
allowStatus.getSeverity() == IStatus.WARNING || |
Also available in: Unified diff
ref #6925 Inject context into operations to allow sync/async execution