org.jlense.uiworks.views Extension Point

Identifier: org.jlense.uiworks.views

Description: 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.

In order to reduce the visual clutter in the Shortcuts view, views should be grouped using categories.

Configuration Markup:

   <!ELEMENT category EMPTY>
   <!ATTLIST category
      id                  CDATA #REQUIRED
      name              CDATA #REQUIRED
      parentCategory   CDATA #IMPLIED
   >

  • id - a unique name that will be used to identify this category
  • name - a translatable name that will be used in the UI for this category
  • parentCategory - an optional path composed of category IDs separated by '/'. This attribute provides for creating category hierarchy.

   <!ELEMENT view EMPTY>
   <!ATTLIST view
      id         CDATA #REQUIRED
      name       CDATA #REQUIRED
      category    CDATA #IMPLIED
      class      CDATA #REQUIRED
      icon       CDATA #IMPLIED
   >

  • id - a unique name that will be used to identify this view
  • name - a translatable name that will be used in the UI for this view
  • category - an optional attribute that is composed of the category IDs separated by '/'. Each referenced category must exist prior to being referenced in this attribute.
  • class - a fully qualified name of the class that implements org.jlense.uiworks.workbench.IViewPart. A common practice is to subclass org.jlense.uiworks.part.ViewPart in order to inherit the default functionality.
  • icon - a relative name of the icon that will be associated with the view.
Examples:

The following is an example of the extension point:

   <extension point="org.jlense.uiworks.views">
      <category
         id="com.xyz.views.XYZviews"
         name="XYZ">
      </category>
      <view
         id="com.xyz.views.XYZView"
         name="XYZ View"
         category="com.xyz.views.XYZviews"
         class="com.xyz.views.XYZView"
         icon="icons/XYZ.gif">
      </view>
   </extension>

API Information: The value of the class attribute must be a fully qualified name of the class that implements org.jlense.uiworks.workbench.IViewPart. It is common practice to subclass org.jlense.uiworks.part.ViewPart when developing a new view.

Supplied Implementation: The UIWorks workbench provides a standard view, the Shortcut view, that displays view shortcuts (see the org.jlense.uiworks.perspectiveExtensions extension point). From the user point of view, this view is no different from any other view provided by plug-ins. 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.