Project

General

Profile

Revision ecdc831d

IDecdc831d75ecd912b3575e8d908c8a15f25747d4
Parent aa29d392
Child 6fd5b6eb

Added by Patrick Plitzner over 3 years ago

ref #6925 Open PK editor in editor area

View differences:

eu.etaxonomy.taxeditor.navigation/META-INF/MANIFEST.MF
20 20
 eu.etaxonomy.taxeditor.cdmlib,
21 21
 eu.etaxonomy.taxeditor.store,
22 22
 eu.etaxonomy.taxeditor.editor,
23
 eu.etaxonomy.taxeditor.workbench,
23 24
 org.eclipse.e4.ui.model.workbench;bundle-version="1.2.0.v20160229-1459",
24 25
 org.eclipse.e4.ui.di,
25 26
 javax.inject,
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/e4/handler/RemotingEditPolytomousKeyNodesHandlerE4.java
18 18
import org.eclipse.core.runtime.jobs.Job;
19 19
import org.eclipse.e4.core.di.annotations.CanExecute;
20 20
import org.eclipse.e4.core.di.annotations.Execute;
21
import org.eclipse.e4.ui.model.application.MApplication;
21 22
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
23
import org.eclipse.e4.ui.model.application.ui.basic.MPartStack;
22 24
import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
23 25
import org.eclipse.e4.ui.services.IServiceConstants;
26
import org.eclipse.e4.ui.workbench.modeling.EModelService;
24 27
import org.eclipse.e4.ui.workbench.modeling.EPartService;
25 28
import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState;
26 29
import org.eclipse.jface.viewers.IStructuredSelection;
......
33 36
import eu.etaxonomy.taxeditor.model.MessagingUtils;
34 37
import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewLabels;
35 38
import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
39
import eu.etaxonomy.taxeditor.workbench.WorkbenchUtility;
36 40

  
37 41
/**
38 42
 * @author cmathew
......
44 48
    public static final String OPENING_POLYTOMOUS_KEYS = Messages.EditPolytomousKeyNodesHandler_OPEN_KEYS;
45 49

  
46 50
    @Execute
47
    public void execute(EPartService partService,
51
    public void execute(EModelService modelService, EPartService partService, MApplication application,
48 52
            @Named(IServiceConstants.ACTIVE_SELECTION)Object selection) {
49 53

  
50 54
        if(selection instanceof StructuredSelection){
......
81 85
                                        }
82 86
                                        if(part==null){
83 87
                                            part = partService.createPart("eu.etaxonomy.taxeditor.editor.key.polytomous.e4.PolytomousKeyListEditorE4");
88
                                            MPartStack editorAreaPartStack = WorkbenchUtility.getEditorAreaPartStack(application, modelService);
89
                                            if(editorAreaPartStack!=null){
90
                                                editorAreaPartStack.getChildren().add(part);
91
                                            }
84 92
                                            part = partService.showPart(part, PartState.ACTIVATE);
85 93
                                            PolytomousKeyListEditorE4 editor = (PolytomousKeyListEditorE4) part.getObject();
86 94
                                            editor.init(input);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)