eu.etaxonomy.taxeditor.cdmlib,
eu.etaxonomy.taxeditor.store,
eu.etaxonomy.taxeditor.editor,
+ eu.etaxonomy.taxeditor.workbench,
org.eclipse.e4.ui.model.workbench;bundle-version="1.2.0.v20160229-1459",
org.eclipse.e4.ui.di,
javax.inject,
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.e4.ui.model.application.MApplication;
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
+import org.eclipse.e4.ui.model.application.ui.basic.MPartStack;
import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
import org.eclipse.e4.ui.services.IServiceConstants;
+import org.eclipse.e4.ui.workbench.modeling.EModelService;
import org.eclipse.e4.ui.workbench.modeling.EPartService;
import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState;
import org.eclipse.jface.viewers.IStructuredSelection;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewLabels;
import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
+import eu.etaxonomy.taxeditor.workbench.WorkbenchUtility;
/**
* @author cmathew
public static final String OPENING_POLYTOMOUS_KEYS = Messages.EditPolytomousKeyNodesHandler_OPEN_KEYS;
@Execute
- public void execute(EPartService partService,
+ public void execute(EModelService modelService, EPartService partService, MApplication application,
@Named(IServiceConstants.ACTIVE_SELECTION)Object selection) {
if(selection instanceof StructuredSelection){
}
if(part==null){
part = partService.createPart("eu.etaxonomy.taxeditor.editor.key.polytomous.e4.PolytomousKeyListEditorE4");
+ MPartStack editorAreaPartStack = WorkbenchUtility.getEditorAreaPartStack(application, modelService);
+ if(editorAreaPartStack!=null){
+ editorAreaPartStack.getChildren().add(part);
+ }
part = partService.showPart(part, PartState.ACTIVATE);
PolytomousKeyListEditorE4 editor = (PolytomousKeyListEditorE4) part.getObject();
editor.init(input);