The Java Developer's Guide to EclipseThe Java Developer's Guide to Eclipse

In Chapter 20, Perspectives, you learned how the extensibility of Eclipse can combine the appropriate views and editors you require to create a new customized perspective. This capability is available to Eclipse users, as well as to plug-in developers. As a tool provider, you can use Eclipse to create a standard set of perspectives composed of the views and editors you learned to create in Chapters 18 and 19.

Running the Example

This example demonstrates a perspective that brings together some of the views and editors from other chapters, as shown below.

Example perspective

The perspective itself is defined in the project com.ibm.jdg2e.perspective. It relies on several projects from other chapters, namely:

The org.eclipse.jdt.astview project is located in the eclipse_tools subdirectory of the CD-ROM's plug-in_development directory; the others are in the examples subdirectory. Import these seven projects into your workspace (see the readme for details). To begin, launch the runtime Workbench (Run > Run As > Eclipse Application). Next, select Window > Open Perspective > Other... and select JDG2E: Example (this choice will be directly available as Open Perspective > JDG2E: Example from the Resource perspective because the example adds itself as a shortcut using org.eclipse.ui.perspectiveExtensions extension point).

Note: If you find that the Example perspective isn't shown in the list of perspectives, double-check that all of its prerequisite plug-ins listed above are imported and available in the runtime Workbench.

Roadmap of the Example

The example is composed of one class, JDG2EPerspectiveFactory, which defines the layout, shortcuts, and actions sets of the JDG2E: Example perspective. This example also contributes views, wizard shortcuts, view shortcuts, and perspective shortcuts from the book's examples to the Resource perspective using the org.eclipse.ui.perspectiveExtensions extension point.

© Copyright International Business Machines Corporation, 2003, 2004, 2006. All Rights Reserved.
Code or samples provided herein are provided without warranty of any kind.