tags:

views:

405

answers:

1

How would I go about inserting an editor inside of a perspective?

+1  A: 

Editors are not bound to perspectives like views are. Perspectives are collections of views, and optionally, a viewable editor area. However, which editor(s) are open at any time is something that's under the control of the workbench, and not the perspectives.

However, in an RCP application, the editor area is either visible (or not). You can control this with the initial perspective factory that's used to customise the screen. (Note that a perspective does not usually toggle the editor area on/off generally.)

Here's an example from vogella.de:

public class Perspective implements IPerspectiveFactory {
    public void createInitialLayout(IPageLayout layout) {
        String editorArea = layout.getEditorArea();
        layout.setEditorAreaVisible(true);
        layout.setFixed(true);
        layout.addStandaloneView(View.ID, false, IPageLayout.LEFT, 1.0f, editorArea);
    }
}
AlBlue