Revision 41c668f3
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/handler/MoveDescriptionToOtherTaxonHandlerE4.java | ||
---|---|---|
13 | 13 |
import org.eclipse.e4.core.di.annotations.Execute; |
14 | 14 |
import org.eclipse.e4.core.di.annotations.Optional; |
15 | 15 |
import org.eclipse.e4.ui.di.UISynchronize; |
16 |
import org.eclipse.e4.ui.model.application.MApplication; |
|
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.model.application.ui.menu.MMenuItem; |
19 | 20 |
import org.eclipse.e4.ui.services.IServiceConstants; |
21 |
import org.eclipse.e4.ui.workbench.modeling.EModelService; |
|
22 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
|
20 | 23 |
import org.eclipse.jface.dialogs.MessageDialog; |
21 | 24 |
import org.eclipse.jface.viewers.ISelection; |
22 | 25 |
import org.eclipse.jface.viewers.IStructuredSelection; |
... | ... | |
53 | 56 |
|
54 | 57 |
private UUID newAcceptedTaxonNodeUuid; |
55 | 58 |
private TaxonNameEditorE4 editor; |
59 |
private MApplication application; |
|
60 |
private EModelService modelService; |
|
61 |
private EPartService partService; |
|
56 | 62 |
|
57 | 63 |
@Execute |
58 | 64 |
public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart, |
59 |
@Optional@Named(IServiceConstants.ACTIVE_SELECTION) Object selection, |
|
60 |
@Named(IServiceConstants.ACTIVE_SHELL)Shell shell, MMenuItem menuItem,
|
|
61 |
UISynchronize sync) { |
|
65 |
@Optional @Named(IServiceConstants.ACTIVE_SELECTION) Object selection,
|
|
66 |
@Named(IServiceConstants.ACTIVE_SHELL) Shell shell, MMenuItem menuItem, EPartService partService,
|
|
67 |
EModelService modelService, MApplication application, UISynchronize sync) {
|
|
62 | 68 |
|
69 |
this.modelService = modelService; |
|
70 |
this.application = application; |
|
71 |
this.partService = partService; |
|
63 | 72 |
|
64 | 73 |
FactualDataPartE4 factualDataPart = (FactualDataPartE4) activePart.getObject(); |
65 | 74 |
Object e4WrappedPart = WorkbenchUtility.getE4WrappedPart(factualDataPart.getSelectionProvidingPart()); |
... | ... | |
141 | 150 |
// if(possibleOpenEditor != null){ |
142 | 151 |
// AbstractUtility.close(possibleOpenEditor); |
143 | 152 |
// } |
144 |
EditorUtil.openTaxonNodeE4(newAcceptedTaxonNodeUuid); |
|
153 |
EditorUtil.openTaxonNodeE4(newAcceptedTaxonNodeUuid, modelService, partService, application);
|
|
145 | 154 |
// } catch (PartInitException e) { |
146 | 155 |
// MessagingUtils.error(this.getClass(), e); |
147 | 156 |
// throw new RuntimeException(e); |
Also available in: Unified diff
ref #6595 code refactoring