® Expeditor makes use of the eclipse IViewPart
interface to be able to tie each shelf view to the workbench. Each view part has a view site that connects it to the workbench, allowing the view to register any global actions with the site’s action bars, including access to its own panel menu, a local toolbar, and the status line. The view can also register any context menus with the site, or register a selection provider to allow the workbench’s ISelectionService
to include the part in its tracking.
When creating a view to be shown in a Lotus
Expeditor shelf view, the class should either implement the interface, org.eclipse.ui.IViewPart
, or subclass the abstract class, org.eclipse.ui.part.ViewPart
. Subclassing ViewPart
is the suggested method, to save the developer from implementing the view from scratch. Subclasses of ViewPart
must implement the following methods:
- createPartControl(Composite parent) – to create the view’s controls
- setFocus() – to receive focus
After creating the class, a contribution to the org.eclipse.ui.views
extension point must be added to the plugin.xml
file for the plug-in, as seen in the following example:
Make sure the following attributes are specified:
- The name attribute describes the String to be displayed in the titlebar.
- The id attribute is the unique identifier of the view. This is also what is used to refer to the view when contributing to the shelfViews extension point.
- The class attribute specifies what class is referenced in this extension.
- The icon attribute describes the icon to be displayed in the top left corner of the titlebar. The standard size is 16x16 pixels.
The view should be optimally viewed in a frame approximately 186 pixels wide. The view is also resizeable. Thus, make sure the content can be scrolled (if applicable), and any toolbars do not get cut off, or have chevrons pointing to more actions.
Parent topic: Contributing to the sidebar