# Other Relevant Extension Points

There are some Eclipse extension points that are relevant as-is to the Remote System Explorer, which we list here. We do not describe how to use these extension points here, except to document the information needed to enable them to in Remote System Explorer.

Extension Point | Description
--- | ---

`org.eclipse.ui.viewActions`

For adding actions to the pulldown menu in any view's local toolbar, or to the toolbar itself. To use this you need to know the ID of the RSE views, for the `targetID` attribute: There are:

- `org.eclipse.rse.ui.view.systemView` for the primary Remote Systems view.
- `org.eclipse.rse.ui.view.teamView` for the Team view in the RSE perspective.
- `org.eclipse.rse.ui.view.systemTableView` for the Remote System Details view in the RSE perspective.

`org.eclipse.ui.propertyPages`

For adding property pages for objects within the Remote System Explorer. To use this you need to know the class type of these objects for the `objectClass` attribute of the `<page>` element:

- Connections: `org.eclipse.rse.core.model.IHost`
- SubSystems: `org.eclipse.rse.core.subsystems.ISubSystem`
- Filter Pools: `org.eclipse.rse.core.filters.ISystemFilterPoolReference`
- Filters: `org.eclipse.rse.core.filters.ISystemFilterReference`
- Remote Elements: your model objects, which are adaptable to `ISystemViewElementAdapter`. For the RSE-provided reusable file, process and shell subsystems, these are `IRemoteFile`, `IRemoteProcess` and `IRemoteCommandShell`, respectively. In the Remote Command View, you'll also find `IRemoteError` and `IRemoteOutput`.

Because all RSE elements adapt to `ISystemViewElementAdapter`, which in turn implements `org.eclipse.ui.IActionFilter`, it is possible to scope your property pages to only appear for certain system types or subsystems, using the extension point's `<filter>` element. For example:

                   <extension point="org.eclipse.ui.propertyPages">
                       <page name="Team Info"
                             class="samples.ui.propertypages.TeamFilterPropertyPage"
                             id="samples.ui.pp.filter.team"
                             objectClass="org.eclipse.rse.core.filters.ISystemFilterReference" >
                        <filter name="subsystemConfigurationId" value="samples.subsystems.factory"/>
                       </page>
                   </extension>

See Scoping for all the filter `names` supported by RSE objects.

`org.eclipse.ui.popupMenus`

For adding pop-up menu actions for objects within the Remote System Explorer. To use this you need to know the class type of these objects for the `objectClass` attribute of the <objectContribution> element:

- Connections: `org.eclipse.rse.core.model.IHost`
- SubSystems: `org.eclipse.rse.core.subsystems.ISubSystem`
- Filter Pools: `org.eclipse.rse.core.filters.ISystemFilterPoolReference`
- Filters: `org.eclipse.rse.core.filters.ISystemFilterReference`
- Remote Elements: your model objects, which are adaptable to `ISystemViewElementAdapter`. For the RSE-provided reusable file, process and shell subsystems, these are `IRemoteFile`, `IRemoteProcess` and `IRemoteCommandShell`, respectively. In the Remote Command View, you'll also find `IRemoteError` and `IRemoteOutput`.

Because all RSE elements adapt to `ISystemViewElementAdapter`, which in turn extends `org.eclipse.ui.IActionFilter`, it is possible to scope your actions to only appear for certain system types or subsystems, using the extension point's `<filter>` element. For example:

                   <extension point="org.eclipse.ui.popupMenus">
                       <objectContribution
                             id ="samples.ui.actions.TeamFilterActions"
                             objectClass="org.eclipse.rse.core.filters.ISystemFilterReference">
                             <filter name="subsystemConfigurationId" value="samples.subsystems.factory"/>
                             <action id="samples.ui.actions.TeamFilterAction1"
                                     label="Sample Team Filter Action"
                                     class="samples.ui.actions.ShowJarContents">
                             </action>
                       </objectContribution>
                   </extension>

See Scoping for all the filter `names` supported by RSE objects.

## Scoping

For the `org.eclipse.ui.propertyPages` and `org.eclipse.ui.popupMenus` extension points, it is possible to scope your property pages and actions to only filters in a particular subsystem, or connections of a particular system type, say. These extension points support the `<filter>` element, which allows you to specify a property name, and a property value, such that the page or action will only show if that property's value is the one given:

      <filter name="name" value="value"/>

It is up to the selected object's adapter to perform this test, in its `testAttribute(Object target,String name,String value)` method. This method is implemented for the adapters for every object shown in the Remote Systems view, and what follows is a list of the tests it will do on the given `value`, for the given `name`:

- `"name"`. Will test the value for an exact match on an object's name, or beginning-of-name match if ends with an asterisk.
- `"type"`. Will test the value for an exact match on an object's type.
- `"offline"`.Will test the value against "true" if the user is working in "offline" mode or "false" if not. Currently only supported for iSeries connections.
- `"connected"`. Will test the value against "true" if the connection containing the selected object is active or "false" if not.
- `"hasChildren"`. Will test the value against "true" if this object's adapter reports that it has children or "false" if it doesn't have children.
- `"systemType"`. Will test the value for an exact match on the system type of this object's parent SystemConnection object. You can specify multiple values if you comma-separate them.
- `"subsystemConfigurationId"`. Will test the value for an exact match on the `ID` of the subsystem factory that created this object's subsystem. Returns false for SystemConnection objects. You can specify multiple values if you comma-separate them.
- `"subsystemConfigurationCategory"`. Will test the value for an exact match on the `category` of the subsystem factory that created this object's subsystem. You can specify multiple values if you comma-separate them.

For system filter objects of type `org.eclipse.rse.core.filters.ISystemFilterReference`, the following names are also supported:

- `"filterType"`. Will test the value for an exact match on the selected filter's untranslated type, as set internally. The only RSE-supplied subsystem to support multiple filter types is the iSeries Objects subsystem for iSeries connections. It contains these types:
  - `"Library"`.
  - `"LibraryList"`.
  - `"Object"`.
  - `"Member"`.

For the `org.eclipse.ui.popupMenus` extension point, you can also use the above names in the <visibility> and <enablement> elements, for extreme flexibility in when the action is shown, and when it is enabled or disabled. These map to the `objectState` attribute. For example:

       <enablement>
           <objectState name="hasChildren" value="true"/>
       </enablement>

Be aware the `<visibility>` element is available at the `<objectContribution>` level, while the `<enablement>` element is available at the `<Action>` level.