<!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: Views</title> | |
</head> | |
<body link="#0000FF" vlink="#800080"> | |
<center> | |
<h1> | |
Views</h1></center> | |
<b><i>Identifier: </i></b>org.eclipse.ui.views | |
<p><b><i>Description: </i></b>This extension point is used to define additional | |
views for the workbench. A view is a visual component within a workbench | |
page. It is typically used to navigate a hierarchy of information | |
(like the workspace), open an editor, or display properties for the | |
active editor. The user can make a view visible from the View submenu | |
or close it from the view local title bar. | |
<p>In order to reduce the visual clutter in the Show View Dialog, views | |
should be grouped using categories. | |
<p><b><i>Configuration Markup:</i></b> | |
<p><tt> <!ELEMENT category EMPTY></tt> | |
<br><tt> <!ATTLIST category</tt> | |
<br><tt> id | |
CDATA #REQUIRED</tt> | |
<br><tt> name | |
CDATA #REQUIRED</tt> | |
<br><tt> parentCategory CDATA #IMPLIED</tt> | |
<br><tt> ></tt> | |
<ul> | |
<li> | |
<b>id</b> - a unique name that will be used to identify this category</li> | |
<li> | |
<b>name</b> - a translatable name that will be used in the UI for this | |
category</li> | |
<li> | |
<b>parentCategory</b> - an optional path composed of category IDs separated | |
by '/'. This attribute provides for creating category hierarchy.</li> | |
</ul> | |
<tt> <!ELEMENT view EMPTY></tt> | |
<br><tt> <!ATTLIST view</tt> | |
<br><tt> id | |
CDATA #REQUIRED</tt> | |
<br><tt> name | |
CDATA #REQUIRED</tt> | |
<br><tt> category CDATA | |
#IMPLIED</tt> | |
<br><tt> class | |
CDATA #REQUIRED</tt> | |
<br><tt> icon | |
CDATA #IMPLIED</tt> | |
<br><tt> ></tt> | |
<ul> | |
<li> | |
<b>id</b> - a unique name that will be used to identify this view</li> | |
<li> | |
<b>name</b> - a translatable name that will be used in the UI for this | |
view</li> | |
<li> | |
<b>category</b> - an optional attribute that is composed of the category | |
IDs separated by '/'. Each referenced category must exist prior to being | |
referenced in this attribute.</li> | |
<li> | |
<b>class</b> - a fully qualified name of the class that implements <tt>org.eclipse.ui.IViewPart</tt>. | |
A common practice is to subclass <tt>org.eclipse.ui.part.ViewPart</tt> | |
in order to inherit the default functionality.</li> | |
<li> | |
<b>icon</b> - a relative name of the icon that will be associated with | |
the view.</li> | |
</ul> | |
<b><i>Examples:</i></b> | |
<p>The following is an example of the extension point: | |
<p><tt> <extension point="org.eclipse.ui.views"></tt> | |
<br><tt> <category</tt> | |
<br><tt> id="com.xyz.views.XYZviews"</tt> | |
<br><tt> name="XYZ"></tt> | |
<br><tt> </category></tt> | |
<br><tt> <view</tt> | |
<br><tt> id="com.xyz.views.XYZView"</tt> | |
<br><tt> name="XYZ View"</tt> | |
<br><tt> category="com.xyz.views.XYZviews"</tt> | |
<br><tt> class="com.xyz.views.XYZView"</tt> | |
<br><tt> icon="icons/XYZ.gif"></tt> | |
<br><tt> </view></tt> | |
<br><tt> </extension></tt> | |
<p><b><i>API Information:</i></b> The value of the <tt>class</tt> attribute | |
must be a fully qualified name of the class that implements <tt>org.eclipse.ui.IViewPart. </tt> | |
It is common practice to subclass<tt> org.eclipse.ui.part.ViewPart</tt> | |
when developing a new view. | |
<p><b><i>Supplied Implementation</i></b>: The workbench provides a number | |
of standard views including Navigator, Properties, Outline and Tasks. From | |
the user point of view, these views are no different from any other view | |
provided by the plug-ins. All the views can be shown from the View submenu. | |
The position of a view is persistent: it is saved when the view is closed | |
and restored when the view is reopened in a single session. The position | |
is also persisted between workbench sessions. | |
<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> |