![]() | The 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.
This example demonstrates a perspective that brings together some of the views and editors from other chapters, as shown below.
The perspective itself is defined in the project
com.ibm.jdg2e.perspective. It relies
on several projects from other chapters, namely:
com.ibm.jdg2e.wizards.newwizards from Chapter 16com.ibm.jdg2e.view.marker from Chapter 18com.ibm.jdg2e.jdt from Chapter 27org.eclipse.jdt.astview described in Chapter 27com.ibm.jdg2e.serviceability from Chapter 28, andcom.ibm.jdg2e.swt_swing.embed.converter from Chapter 33.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.
The example is composed of one class, © Copyright International Business Machines Corporation, 2003, 2004, 2006. All Rights Reserved.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.
Code or samples provided herein are provided without warranty of any kind.