blob: d006810e2009ac704ccc28428beb1524de5fb140 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD>
<HTML>
<BODY>
<H1><CENTER>Perspective Extensions</CENTER></H1>
<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>
<p><samp>&nbsp;&nbsp; &lt;!ELEMENT extension (perspectiveExtension*)&gt;</samp>
<br><br><samp>&nbsp;&nbsp; &lt;!ATTLIST extension</samp>
<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;point&nbsp;CDATA #REQUIRED</samp>
<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id&nbsp;&nbsp;&nbsp;&nbsp;CDATA #IMPLIED</samp>
<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name&nbsp;&nbsp;CDATA #IMPLIED</samp>
<br><samp>&nbsp;&nbsp; &gt;</samp>
<ul>
<li><b>point</b> - a fully qualified identifier of the target extension point</li><li><b>id</b> - an optional identifier of the extension instance</li><li><b>name</b> - an optional name of the extension instance</li></ul>
<p><samp>&nbsp;&nbsp; &lt;!ELEMENT perspectiveExtension (actionSet | viewShortcut | perspectiveShortcut | newWizardShortcut | view)*&gt;</samp>
<br><br><samp>&nbsp;&nbsp; &lt;!ATTLIST perspectiveExtension</samp>
<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;targetID&nbsp;CDATA #REQUIRED</samp>
<br><samp>&nbsp;&nbsp; &gt;</samp>
<ul>
<li><b>targetID</b> - the unique identifier of the perspective (as specified in the registry) into which the contribution is made.</li></ul>
<p><samp>&nbsp;&nbsp; &lt;!ELEMENT actionSet EMPTY&gt;</samp>
<br><br><samp>&nbsp;&nbsp; &lt;!ATTLIST actionSet</samp>
<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id&nbsp;CDATA #REQUIRED</samp>
<br><samp>&nbsp;&nbsp; &gt;</samp>
<ul>
<li><b>id</b> - the unique identifier of the action set which will be added to the perspective.</li></ul>
<p><samp>&nbsp;&nbsp; &lt;!ELEMENT viewShortcut EMPTY&gt;</samp>
<br><br><samp>&nbsp;&nbsp; &lt;!ATTLIST viewShortcut</samp>
<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id&nbsp;CDATA #REQUIRED</samp>
<br><samp>&nbsp;&nbsp; &gt;</samp>
<ul>
<li><b>id</b> - the unique identifier of the view which will be added to the perspective's "Show View" submenu of the "Window" menu.</li></ul>
<p><samp>&nbsp;&nbsp; &lt;!ELEMENT perspectiveShortcut EMPTY&gt;</samp>
<br><br><samp>&nbsp;&nbsp; &lt;!ATTLIST perspectiveShortcut</samp>
<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id&nbsp;CDATA #REQUIRED</samp>
<br><samp>&nbsp;&nbsp; &gt;</samp>
<ul>
<li><b>id</b> - the unique identifier of the perspective which will be added to the perspective's "Open Perspective" submenu of the "Window" menu.</li></ul>
<p><samp>&nbsp;&nbsp; &lt;!ELEMENT newWizardShortcut EMPTY&gt;</samp>
<br><br><samp>&nbsp;&nbsp; &lt;!ATTLIST newWizardShortcut</samp>
<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id&nbsp;CDATA #REQUIRED</samp>
<br><samp>&nbsp;&nbsp; &gt;</samp>
<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>
<p><samp>&nbsp;&nbsp; &lt;!ELEMENT showInPart EMPTY&gt;</samp>
<br><br><samp>&nbsp;&nbsp; &lt;!ATTLIST showInPart</samp>
<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id&nbsp;CDATA #IMPLIED</samp>
<br><samp>&nbsp;&nbsp; &gt;</samp>
<ul>
<li><b>id</b> - the unique identifier of the view which will be added to the perspective's "Show In..." prompter in the Navigate menu.</li></ul>
<p><samp>&nbsp;&nbsp; &lt;!ELEMENT view EMPTY&gt;</samp>
<br><br><samp>&nbsp;&nbsp; &lt;!ATTLIST view</samp>
<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</samp>
<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;relative&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</samp>
<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;relationship&nbsp;(stack|left|right|top|bottom|fast) #REQUIRED</samp>
<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ratio&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #IMPLIED</samp>
<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;visible&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(true | false) "false"#IMPLIED</samp>
<br><samp>&nbsp;&nbsp; &gt;</samp>
<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 <samp>relationship</samp>.</li><li><b>relationship</b> - specifies the relationship between <samp>id</samp> and
<samp>relative</samp>.
The following values are supported:
<ul>
<b>fast</b> - the view extension will be created as a fast view.
<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 <samp>ratio</samp> must also
be defined.</ul></li><li><b>ratio</b> - the percentage of area within the relative view which will be donated to the view extension. If the view extension is a fast view, the ratio is the percentage of the workbench the fast view will cover when active. This must be defined as a floating point value and lie between 0.05 and 0.95.</li><li><b>visible</b> - whether the view is initially visible when the perspective is opened. This attribute should have a value of "true" or "false" if used.
If this attribute is not used, the view will be initially visible by default.</li></ul>
<b><i>Examples: </i></b>The following is an example of a perspective extension (note the subelements and the way attributes are used):
<p>
<pre>
&lt;extension point="org.eclipse.ui.perspectiveExtensions"&gt;
&lt;perspectiveExtension
targetID="org.eclipse.ui.resourcePerspective"&gt;
&lt;actionSet id="org.eclipse.jdt.ui.JavaActionSet"/&gt;
&lt;viewShortcut id="org.eclipse.jdt.ui.PackageExplorer"/&gt;
&lt;newWizardShortcut id="org.eclipse.jdt.ui.wizards.NewProjectCreationWizard"/&gt;
&lt;perspectiveShortcut id="org.eclipse.jdt.ui.JavaPerspective"/&gt;
&lt;view id="org.eclipse.jdt.ui.PackageExplorer"
relative="org.eclipse.ui.views.ResourceNavigator"
relationship="stack"/&gt;
&lt;view id="org.eclipse.jdt.ui.TypeHierarchy"
relative="org.eclipse.ui.views.ResourceNavigator"
relationship="left"
ratio="0.50"/&gt;
&lt;/perspectiveExtension&gt;
&lt;/extension&gt;
</pre>
</p>
<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 and the Type Hierarchy View is
added beside the Resource Navigator.
</p><p>
<b><i>API Information: </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>
<p>
Copyright (c) 2002 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Common Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/cpl-v10.html<p>
</BODY>
</HTML>