The org.eclipse.rse.ui.subsystemConfiguration extension point is defined in the plugin org.eclipse.rse.ui. This is the most complex extension point to use, but also the most powerful. It enables tool providers to register a class that creates subsystem objects, which appear under a connection when a connection is expanded in the Remote Systems view. For example, here is an iSeries connection with four subsystems, each created by a subsystem configuration registered with this extension point.
The extension markup is quite simple for this extension point, as it has only one element, <configuration>, with only a few simple attributes to supply:
It is important to remember what the purpose of a subsystem is, and how it fits in the overall RSE model, so as to understand the programming details for supporting
subsystems via this subsystem configuration extension point. Minimally speaking, this extension point requires a class that implements the interface
ISubSystemFactory.
Ultimately, the intent of a subsystem configuration is to provide individual
subsystem instances to each connection, and the intent of a subsystem instance is to present remote resources for display or manipulation purposes. Thus, you must also create a class implementing the interface ISubSystem.
The intent of each subsystem is to show remote resources from the remote system
identified by the parent connection, for the user. (Subsystems can in fact be hidden, which means their their role is to return remote resources for programmatic purposes only.) When the first request is made for remote objects, the subsystem is asked to connect to the remote system if it is not already.
This job is deferred to a IConnectorService object whose role it is to manage connecting and disconnecting
to the remote physical system. By use of a connector service manager,
one system can manage the live connections of multiple subsystems in the same system connection, should they happen to share the same communication pipe.
If filters are supported
(the default), the first connection is made, and the remote resources are subsequently shown, when filters within the subsystem
are expanded, which results in a call to
resolveFilterString
in the subsystem object.
Furthermore, you will want to supply your own
new-filter and
change-filter actions.
If filters are not supported, then these remote resources are shown immediately when the subsystem itself is expanded, via a call to
getChildren.
Either way the resulting resources are displayed to the user. To facilitate the displaying of these objects in the RSE views, the objects
themselves must implement the Eclipse IAdaptable interface (to enable the property sheet viewer) and there must be a specific RSE
view
adapter
and an RSE remote-information
adapter
registered for the remote objects, which the RSE views consult to get the labels, images, actions,
and property sheet values for the remote objects.
Typically, you will supply actions by leveraging the user interface elements supplied by the RSE, such as base classes for messages, actions, dialogs, wizards, property pages and preference page editors. You will probably also supply a
property page for your subsystem objects, via the Eclipse propertyPages extension point, and for your remote resource objects, via the RSE propertyPages extension point.
For many of the interfaces you must implement, there are base classes supplied that you can extend to make the development effort easier.
The following summarizes the minimum set of classes you will be creating in order to realize your own subsystem support, including the RSE-supplied base classes to extend:
Class(es) | Base Class | Description |
---|---|---|
subsystem configuration | SubSystemConfiguration | The factory class responsible for creating instances of subsystem class |
subsystem | SubSystem | The subsystem class. There will be one instance created for each connection. In addition to storing your unique attributes, this must return the remote resource objects when a filter is expanded within the subsystem. How that communication with the remote system is done is left up to you. |
system | AbstractConnectorService | Represents and manages a live connection to the remote system, doing the connecting and disconnecting. |
system manager | AbstractConnectorServiceManager | Manages a single system instance that is shared among multiple subsystems in a single connection. Even if you only have a single subsystem configuration it is useful to use this in case you later add additional factories, and their subsystems share the same communication pipe. To enable this, all your subsystem classes need to implement a unique interface of your own creation. |
remote resource | AbstractResource | Can be used as a base class for the objects representing remote resources. |
new-filter wizard | SystemNewFilterAction and SystemFilterStringEditPane | Displays a wizard prompting for a new filter. Filters contain filter strings, which are up to each subsystem to design and interpret. The New Filter wizard prompts for a single filter string (more can be added in change mode). Typically you subclass SystemFilterStringEditPane to create your own prompt for the filter string information, and then subclass SystemNewFilterAction so as to configure the default New Filter wizard to use your edit pane in the first page. |
change-filter dialog | SystemChangeFilterAction and SystemFilterStringEditPane | Displays a dialog prompting to change an existing filter. The default dialog allows the user to create and edit filter strings. Typically, you override the SystemChangeFilterAction class, and configure the dialog to use the same edit pane used in the New Filter wizard. |
remote element adapter | AbstractSystemViewAdapter and ISystemRemoteElementAdapter | The view adapter is an amalgamation of all the required information needed to populate the RSE views. You will define one class per unique remote object interface or class, and in it you will override methods to return the remote object's label, image, popup-menu actions, property sheet properties and children (if expandable). You can also decide whether to enable common RSE popup menu actions like rename, delete and refresh. Your view adapter will usually also implement the remote adapter interface, enabling the many common RSE capabilities to work, such as the copy, paste, drag and drop, and more. |
Implementing a subsystem involves the following steps, in the following order:
See the subsystem tutorial for a step-by-step example.