Description: This extension point is used to extend perspectives registered by other plug-ins. A perspective defines the initial contents of the window action bars (menu and toolbar) and the initial set of views and their layout within a workbench page. Other plug-ins may contribute actions and views to the perspective. These actions and views appear when the perspective is selected. Optional additions by other plug-ins are appended to the initial definition.
Configuration Markup:
<!ELEMENT perspectiveExtension (actionSet | viewShortcut
| perspectiveShortcut | newWizardShortcut | view)*>
<!ATTLIST perspectiveExtension
targetID CDATA #REQUIRED
>
<!ELEMENT actionSet EMPTY>targetID - the unique identifier of the perspective (as specified in the registry) into which the contribution is made.
The following is an example of a perspective extension (note the subelements and the way attributes are used):
<extension point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="org.eclipse.ui.resourcePerspective">
<actionSet id="org.eclipse.jdt.ui.JavaActionSet"/>
<viewShortcut id="org.eclipse.jdt.ui.PackageExplorer"/>
<newWizardShortcut id="org.eclipse.jdt.ui.wizards.NewProjectCreationWizard"/>
<perspectiveShortcut id="org.eclipse.jdt.ui.JavaPerspective"/>
<view id="org.eclipse.jdt.ui.PackageExplorer"
relative="org.eclipse.ui.views.ResourceNavigator"
relationship="stack"/>
<view id="org.eclipse.jdt.ui.TypeHierarchy"
relative="org.eclipse.ui.views.ResourceNavigator"
relationship="left"
ratio="0.50"/>
</perspectiveExtension>
</extension>
In the example above, an action set, view shortcut, new wizard shortcut, and perspective shortcut are contributed to the initial contents of the Resource Perspective. In addition, the Package Explorer view is stacked on the Resource Navigator view and the Type Hierarchy view is added beside the Resource Navigator view.
API Information: The items defined within the perspective extension are contributed to the initial contents of the target perspective. Following this, the user may remove any contribution or add others to a perspective from within the workbench user interface.