Creating a New Perspective
A perspective is an optional container for a set of parts. Perspectives can be used to store different arrangements of parts. For example, the Eclipse IDE uses them to lay out the views appropriate to the task (development, debugging, review, etc.) that the developer wants to perform.
To create a perspective and understand the concept of perspectives in Eclipse, you can use the plug-in with a perspective
WSO2 plug-in project sample. This creates a simple sample plug-in including a perspective and associated views for the perspective.
In the plugin.xml
 file of the sample, you can see that the new perspective has been added via the in-built Eclipse extension point to integrate perspectives with the workbench.
<extension point="org.eclipse.ui.perspectives"> <perspective name="Sample Perspective" class="org.wso2.developerstudio.eclipse.perspective.plugin.sample.SamplePerspective" id="org.eclipse.developerstudio.perspective.plugin.sample.Test"> </perspective> </extension>
The SamplePerspective
class in which the new perspective has been implemented, should implement the IPerspectiveFactory
class.
A new view has been added to the perspective, as shown below. To understand more about views and how they are integrated to the workbench, see Creating a View.
private static final String EDITOR_VIEW_ID = "org.wso2.developerstudio.eclipse.perspective.plugin.sample.editorView"; public void createInitialLayout(IPageLayout layout) {  layout.addView(EDITOR_VIEW_ID, IPageLayout.RIGHT, .25f, IPageLayout.ID_EDITOR_AREA);
The editor is disabled in the new perspective. However, if you want to integrate an editor in your perspective, you can disable the following line and add an editor. See Creating a New Editor.
layout.setEditorAreaVisible(false);