<!doctype html public "-//w3c//dtd html 4.0//en"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
<title>Eclipse Workbench Extension Point: Perspective Extensions</title> | |
</head> | |
<body link="#0000FF" vlink="#800080"> | |
<center> | |
<h1> | |
Perspective Extensions</h1></center> | |
<b><i>Identifier: </i></b>org.eclipse.ui.perspectiveExtensions | |
<p><b><i>Description: </i></b>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 or views to the perspective which appear when the perspective is | |
selected. Optional additions by other plug-ins are appended to the | |
initial definition. | |
<p><b><i>Configuration Markup:</i></b> | |
<p><tt> <!ELEMENT perspectiveExtension (actionSet | viewShortcut | |
| perspectiveShortcut |</tt> | |
<br><tt> newWizardShortcut | view)*></tt> | |
<br><tt> <!ATTLIST perspectiveExtension</tt> | |
<br><tt> targetID CDATA #REQUIRED</tt> | |
<br><tt> ></tt> | |
<blockquote> | |
<li> | |
<b>targetID</b> - the unique identifier of the perspective (as specified in the registry) | |
into which the contribution is made.</li> | |
</blockquote> | |
<tt> <!ELEMENT actionSet EMPTY></tt> | |
<br><tt> <!ATTLIST actionSet</tt> | |
<br><tt> id | |
CDATA #REQUIRED</tt> | |
<br><tt> ></tt> | |
<ul> | |
<li> | |
<b>id</b> - the unique identifier of the action set which will be added to the perspective.</li> | |
</ul> | |
<tt> <!ELEMENT viewShortcut EMPTY></tt> | |
<br><tt> <!ATTLIST viewShortcut</tt> | |
<br><tt> id | |
CDATA #REQUIRED</tt> | |
<br><tt> ></tt> | |
<ul> | |
<li> | |
<b>id</b> - the unique identifier of the view which will be added to the perspective's "Show | |
View" submenu of the "Perspective" menu.</li> | |
</ul> | |
<tt> <!ELEMENT newWizardShortcut EMPTY></tt> | |
<br><tt> <!ATTLIST newWizardShortcut</tt> | |
<br><tt> id | |
CDATA #REQUIRED</tt> | |
<br><tt> ></tt> | |
<ul> | |
<li> | |
<b>id</b> - the unique identifier of the new wizard which will be added to the perspective's | |
"New" submenu of the "File" menu.</li> | |
</ul> | |
<tt> <!ELEMENT perspectiveShortcut EMPTY></tt> | |
<br><tt> <!ATTLIST perspectiveShortcut</tt> | |
<br><tt> id | |
CDATA #REQUIRED</tt> | |
<br><tt> ></tt> | |
<ul> | |
<li> | |
<b>id</b> - the unique identifier of the perspective which will be added to the perspective's | |
"Open" submenu of the "Perspective" menu.</li> | |
</ul> | |
<tt> <!ELEMENT view EMPTY></tt> | |
<br><tt> <!ATTLIST view</tt> | |
<br><tt> id | |
CDATA #REQUIRED</tt> | |
<br><tt> relative | |
CDATA #REQUIRED</tt> | |
<br><tt> relationship | |
CDATA #REQUIRED</tt> | |
<br><tt> ratio | |
CDATA #OPTIONAL</tt> | |
<br><tt> ></tt> | |
<ul> | |
<li> | |
<b>id</b> - the unique identifier of the view which will be added to the perspective layout.</li> | |
<li> | |
<b>relative</b> - the unique identifier of a view which already exists in the perspective. | |
This will be used as a reference point for placement of the view. | |
The relationship between these two views is defined by <tt>relationship</tt>.</li> | |
<li> | |
<b>relationship</b> - specifies the relationship between <tt>id</tt> and | |
<tt>relative</tt>. The following values are supported:</li> | |
<ul> | |
<br><b>stack</b> - the view extension will be stacked with the relative | |
view in a folder. | |
<br><b>left, right, top, bottom</b> - the view extension will be placed | |
beside the relative view. In this case a <tt>ratio</tt> must also | |
be defined. | |
<br> </ul> | |
<li> | |
<b>ratio</b> - the percentage of area within the relative view which will | |
be donated to the view extension. This must be defined as a floating | |
point value and lie between 0.0 and 1.0.</li> | |
</ul> | |
<b><i>Examples:</i></b> | |
<p>The following is an example of a perspective extension (note the subelements | |
and the way attributes are used): | |
<p><tt> <extension point="org.eclipse.ui.perspectiveExtensions"></tt> | |
<br><tt> <perspectiveExtension</tt> | |
<br><tt> | |
targetID="org.eclipse.ui.resourcePerspective"></tt> | |
<br><tt> | |
<actionSet id="org.eclipse.jdt.ui.JavaActionSet"/></tt> | |
<br><tt> | |
<viewShortcut id="org.eclipse.jdt.ui.PackageExplorer"/></tt> | |
<br><tt> | |
<newWizardShortcut id="org.eclipse.jdt.ui.wizards.NewProjectCreationWizard"/></tt> | |
<br><tt> | |
<perspectiveShortcut id="org.eclipse.jdt.ui.JavaPerspective"/></tt> | |
<br><tt> | |
<view id="org.eclipse.jdt.ui.PackageExplorer"</tt> | |
<br><tt> | |
relative="org.eclipse.ui.views.ResourceNavigator"</tt> | |
<br><tt> | |
relationship="stack"/></tt> | |
<br><tt> | |
<view id="org.eclipse.jdt.ui.TypeHierarchy"</tt> | |
<br><tt> | |
relative="org.eclipse.ui.views.ResourceNavigator"</tt> | |
<br><tt> | |
relationship="left"</tt> | |
<br><tt> | |
ratio="0.50"/></tt> | |
<br><tt> </perspectiveExtension></tt> | |
<br><tt> </extension></tt> | |
<p>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. | |
<p><b><i>Additional Notes: </i></b>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. | |
<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a> | |
</body> | |
</html> |