![]() |
In the Perspectives lecture you learned how to extend the Eclipse user interface by adding a perspective.
This example builds a perspective as shown below, using the view called
MyView
that is provided on this CD-ROM, and shortcuts to perspectives and wizards.
Please verify that you have installed the code from the CD-ROM and you
have a project in your workspace named, com.ibm.soln.Perspective.
To run
the example, launch the run-time instance of Eclipse (Run > Run-time Workbench).
Select Window > Open Perspective > Soln: Perspective. The new perspective is opened. You will notice that there is no editor area and that the view called MyView
is in its place.
A wizard shortcut called Soln: My Basic Wizard is added to the list of wizard shortcuts
Another distinguishing characteristic of this perspective is that it adds
the Java Type perspective to the list of perspective shortcuts.
Let's explore the steps involved to create this example.
The class that defines the perspective is called EduPerspective
. When defining a new perspective, you need to implement the IPerspectiveFactory
interface.
In the EduPerspective
class, the createInitialLayout
method defines the layout of the perspective the first time it is displayed.
The table below contains the class description and link to the Javadoc.
Class (All) | Description |
EduPerspective |
Creates a new perspective called EduPerspective |
© Copyright International Business Machines Corporation, 2003.
All rights reserved.