2. Make sure when you run the program you see this output.

3. Open plugin.xml
4. Go to "Extensions" tab.
5. Select the org.eclipse.ui.views item, right click, select view to add a new view



6. In the Extension Element Details section on the right, you should see the class as addingview.ViewPart2. Click the class link.

7. See the pop-up. It will create a view class file for you.

8. When the class file is create make sure you add the ID field.
The value of the ID field should be same with the ID of the view in plugin.xml
public static String ID = "AddingView.view2";
9. Add a label to the view so that you can be sure about the opened view
Change the createPartControl method as follows
@Override
public void createPartControl(Composite parent)
{
Label otherViewLabel = new Label(parent, SWT.NONE);
otherViewLabel.setText("Other view");
}
10. Finally, add your view to the perspective. Open the perspective file and change the createInitialLayout method as follows"
public void createInitialLayout(IPageLayout layout)
{
String editorArea = layout.getEditorArea();
layout.setEditorAreaVisible(false);
layout.setFixed(true);
layout.addStandaloneView(ViewPart2.ID, false, IPageLayout.LEFT, 1.0f, editorArea);
}
--
You can get the source code from here.






