Revision 41c668f3
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/handler/ChangeSynonymToAcceptedTaxonHandlerE4.java | ||
---|---|---|
17 | 17 |
import org.eclipse.e4.core.di.annotations.CanExecute; |
18 | 18 |
import org.eclipse.e4.core.di.annotations.Execute; |
19 | 19 |
import org.eclipse.e4.ui.di.UISynchronize; |
20 |
import org.eclipse.e4.ui.model.application.MApplication; |
|
20 | 21 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
21 | 22 |
import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem; |
22 | 23 |
import org.eclipse.e4.ui.services.IServiceConstants; |
24 |
import org.eclipse.e4.ui.workbench.modeling.EModelService; |
|
25 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
|
23 | 26 |
import org.eclipse.jface.viewers.IStructuredSelection; |
24 | 27 |
import org.eclipse.swt.widgets.Shell; |
25 | 28 |
import org.eclipse.ui.PartInitException; |
... | ... | |
52 | 55 |
.getLogger(ChangeSynonymToAcceptedTaxonHandlerE4.class); |
53 | 56 |
|
54 | 57 |
private TaxonNameEditorE4 editor; |
58 |
private EPartService partService; |
|
59 |
private MApplication application; |
|
60 |
private EModelService modelService; |
|
55 | 61 |
|
56 | 62 |
@Execute |
57 |
public void execute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart, |
|
58 |
@Named(IServiceConstants.ACTIVE_SELECTION)IStructuredSelection selection,
|
|
59 |
@Named(IServiceConstants.ACTIVE_SHELL)Shell shell,
|
|
63 |
public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart,
|
|
64 |
@Named(IServiceConstants.ACTIVE_SELECTION) IStructuredSelection selection, EPartService partService,
|
|
65 |
EModelService modelService, MApplication application, @Named(IServiceConstants.ACTIVE_SHELL) Shell shell,
|
|
60 | 66 |
UISynchronize sync) { |
61 | 67 |
|
68 |
this.modelService = modelService; |
|
69 |
this.application = application; |
|
70 |
this.partService = partService; |
|
71 |
|
|
62 | 72 |
editor = (TaxonNameEditorE4) activePart.getObject(); |
63 | 73 |
|
64 | 74 |
TaxonEditorInputE4 input = editor.getEditorInput(); |
... | ... | |
112 | 122 |
TaxonNode newNode = (TaxonNode) objectAffectedByOperation; |
113 | 123 |
|
114 | 124 |
try { |
115 |
EditorUtil.openTaxonNodeE4(newNode.getUuid()); |
|
125 |
EditorUtil.openTaxonNodeE4(newNode.getUuid(), modelService, partService, application);
|
|
116 | 126 |
} catch (PartInitException e) { |
117 | 127 |
e.printStackTrace(); |
118 | 128 |
} catch (Exception e) { |
Also available in: Unified diff
ref #6595 code refactoring