1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 23:25:26 +02:00

Update ISV Docs for Refactorings: model -> core.model, filters -> core.filters

This commit is contained in:
Martin Oberhuber 2006-09-20 23:22:54 +00:00
parent 7e823836c8
commit dcfd8f3f40
18 changed files with 919 additions and 890 deletions

View file

@ -52,14 +52,44 @@
</table>
<table><tbody><tr><td>
<ul>
<li>The <b>subsystemConfiguration</b> extension point has been renamed to
<a href="http://dsdp.eclipse.org/help/latest/topic/org.eclipse.rse.doc.isv/reference/extension-points/org_eclipse_rse_ui_subsystemConfigurations.html">
<li><b>Renamed</b> the <b>org.eclipse.rse.ui.subsystemConfiguration</b> extension point
to <a href="http://dsdp.eclipse.org/help/latest/topic/org.eclipse.rse.doc.isv/reference/extension-points/org_eclipse_rse_ui_subsystemConfigurations.html">
subsystemConfigurations</a>
in order to better match the standard naming scheme used by the Platform.</li>
<li>The <b>newConnectionWizardDelegate</b> extension point has been renamed to
<a href="http://dsdp.eclipse.org/help/latest/topic/org.eclipse.rse.doc.isv/reference/extension-points/org_eclipse_rse_ui_newConnectionWizardDelegates.html">
<li><b>Renamed</b> the <b>org.eclipse.rse.ui.newConnectionWizardDelegate</b> extension point
to <a href="http://dsdp.eclipse.org/help/latest/topic/org.eclipse.rse.doc.isv/reference/extension-points/org_eclipse_rse_ui_newConnectionWizardDelegates.html">
newConnectionWizardDelegates</a>
in order to better match the standard naming scheme used by the Platform.</li>
<li><b>Removed</b> the <b>org.eclipse.rse.ui.rseConfigDefaults</b> extension point.
Use Java Properties instead, as described in the documentation.</li>
<li><b>Removed</b> the <b>org.eclipse.rse.ui.passwordPersistence</b> extension point.
The same functionality is achieved by using the data known from the
subsystemConfigurations extension point.</li>
<li><b>Moved</b> several <b>RSE Model Objects and Interfaces</b> from org.eclipse.rse.ui to core:
<ul>
<li>(UI) <code>org.eclipse.rse.model</code> --&gt; <code>org.eclipse.rse.core.model</code></li>
<li>(UI) <code>org.eclipse.rse.filters</code> --&gt; <code>org.eclipse.rse.core.filters</code></li>
<li>(UI) <code>org.eclipse.rse.subsystems.servicesubsystem</code> --&gt; <code>org.eclipse.rse.core.subsystems</code></li>
</ul>
Client code can be adapted to the new locations easily by invoking "Organize Imports" except for
the following additional changes that need to be made:
<ul>
<li><b>Event handling methods</b> for <code>ISystemResourceChangeEvent</code>,
<code>ISystemPreferenceChangeEvent</code>,
<code>ISystemModelChangeEvent</code>,
<code>ISystemRemoteChangeEvent</code> have been removed from
<b>ISystemRegistry</b>, such that they are available only in the
<b>SystemRegistry</b> implementation. This applies to the fireEvent(),
postEvent() and corresponding add...Listener() methods. The simplest
fix in user code is to get the SystemRegistry from RSEUIPlugin
instead of SystemRegistry as described below.</li>
<li>Use <code>RSEUIPlugin.getTheSystemRegistry()</code> instead of <code>SystemRegistry.getSystemRegistry()</code></li>
</ul>
Note that wherever possible, client code should only refer to the model object
interfaces in <code>org.eclipse.rse.core.*</code> and not use the actual
implementations which still reside in the UI plugin (these will be moved
to core eventually, too).
</li>
</ul>
</td></tr></tbody></table>
@ -98,7 +128,7 @@ be informed in case the APIs should change.</p>
local subsystems (these do not define any new APIs anyways).</li>
<li>The <tt>IConnectorService</tt> interface may be slightly modified
in order to allow for better UI / Non-UI separation.</li>
<li>Some RSE Model classes may be moved from the UI plugin to the
<li>Some more RSE Model classes may be moved from the UI plugin to the
non-UI core plugin.</li>
</ul>
If you want to start programming against RSE APIs now, best let us know
@ -134,11 +164,7 @@ deliverables did not make it into this build:
The following critical or major bugs are currently known.
We'll strive to fix these as soon as possible.
<ul>
<li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=150949">bug 150949</a> - maj - RSE gets unusable when full logging is enabled</li>
<li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=143462">bug 143462</a> - maj - [updating] Dirty remote editors do not get notified</li>
<li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=143292">bug 143292</a> - maj - [mac] Move Resource dialog causes hang/crash</li>
<li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=139207">bug 139207</a> - maj - Browsing into some remote tar archives fails, and may crash the dstore server<br/>
-- This problem was only observed with invalid tar archives.</li>
</ul>
Click
<a href="https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&classification=DSDP&product=Target+Management&component=RSE&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_severity=blocker&bug_severity=critical&bug_severity=major&cmdtype=doit">here</a>

View file

@ -136,7 +136,7 @@ in your own subsystem's <A href="../reference/api/org/eclipse/rse/core/subsystem
When a subsystem is expanded, users usually see <b>filters</b>. Since subsystems typically list remote artifacts,
it is typical that a mechanism is needed to allow users to define which artifacts they wish to see, with some
form of filtering criteria. Filters are this mechanism. The filter support is fully supplied by the RSE framework.
A filter is simply a <A href="../reference/api/org/eclipse/rse/filters/ISystemFilter.html">ISystemFilter</A>
A filter is simply a <A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilter.html">ISystemFilter</A>
object containing a name and a collection of <b>filter strings</b>. Filter strings are just strings, which
the subsystem is required to interpret. When a user expands a filter, the owning subsystem is asked to resolve
the filter strings within the filter. The subsystem typically interprets each filter string as some form of
@ -155,12 +155,12 @@ It is possible to author a subsystem that does not support filters, if this is d
Subsystems do not actually "own" filters. Since each host has unique subsystems, if each subsystem owned its
own filters then filters could not be shared across Hosts, which is sometimes desirable. Instead, filters are
actually contained within <b>filter pools</b>. Filter pools are simply
<A href="../reference/api/org/eclipse/rse/filters/ISystemFilterPool.html">ISystemFilterPool</A>
<A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPool.html">ISystemFilterPool</A>
objects which have a name and a collection of filters.
Filter pools are owned by subsystem configurations, per profile. That is, each subsystem configuration will contain filter pools
scoped by profile. Each such configuration plus profile grouping is known internally as a
<A href="../reference/api/org/eclipse/rse/filters/ISystemFilterPoolManager.html">filter pool manager</A>.
Subsystems contain <A href="../reference/api/org/eclipse/rse/filters/ISystemFilterPoolReference.html">references</A>
<A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolManager.html">filter pool manager</A>.
Subsystems contain <A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolReference.html">references</A>
to filter pools. By default, each subsystem configuration automatically creates one filter pool
for each profile, named the "xxx Filter Pool", where "xxx" is the name of the profile. Subsystems contain references to
filter pools, so that as the filters in the pool are created, changed, deleted or re-ordered, those changes are automatically
@ -198,7 +198,7 @@ be exported and imported.
<h2><A name="Registry">System Registry</A></h2>
<p>The programmatic front door to all the artifacts in the RSE is the
<b>System Registry</b>, which is an object implementing
<A href="../reference/api/org/eclipse/rse/model/ISystemRegistry.html">ISystemRegistry</A>.
<A href="../reference/api/org/eclipse/rse/core/model/ISystemRegistry.html">ISystemRegistry</A>.
This is a singleton object that you
can access by calling the static method
<A href="../reference/api/org/eclipse/rse/model/SystemStartHere.html#getSystemRegistry()">getSystemRegistry()</A> in the

View file

@ -16,20 +16,20 @@
<p>At runtime, the model takes a slightly different form:</p>
<ul>
<li>
<A href="../reference/api/org/eclipse/rse/model/ISystemProfile.html">Profiles</A> are managed by a
<A href="../reference/api/org/eclipse/rse/model/ISystemProfileManager.html">profile manager</A>, and contain:
<A href="../reference/api/org/eclipse/rse/core/model/ISystemProfile.html">Profiles</A> are managed by a
<A href="../reference/api/org/eclipse/rse/core/model/ISystemProfileManager.html">profile manager</A>, and contain:
</li>
<ul>
<li><A href="../reference/api/org/eclipse/rse/model/ISystemHostPool.html">Host Pools</A>, one per profile, which contain</li>
<li><A href="../reference/api/org/eclipse/rse/core/model/ISystemHostPool.html">Host Pools</A>, one per profile, which contain</li>
<ul>
<li><A href="../reference/api/org/eclipse/rse/model/IHost.html">Hosts</A></li>
<li><A href="../reference/api/org/eclipse/rse/core/model/IHost.html">Hosts</A></li>
</ul>
<li><A href="../reference/api/org/eclipse/rse/filters/ISystemFilterPool.html">Filter pools</A>, keyed by Subsystem Configuration, and managed by a <A href="../reference/api/org/eclipse/rse/filters/ISystemFilterPoolManager.html">filter pool manager</A>
<li><A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPool.html">Filter pools</A>, keyed by Subsystem Configuration, and managed by a <A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolManager.html">filter pool manager</A>
which contain</li>
<ul>
<li><A href="../reference/api/org/eclipse/rse/filters/ISystemFilter.html">Filters</A>, which contain</li>
<li><A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilter.html">Filters</A>, which contain</li>
<ul>
<li><A href="../reference/api/org/eclipse/rse/filters/ISystemFilterString.html">Filter strings</A></li>
<li><A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterString.html">Filter strings</A></li>
</ul>
</ul>
<!--
@ -44,8 +44,8 @@ which contain</li>
<ul>
<li><A href="../reference/api/org/eclipse/rse/core/subsystems/SubSystem.html">Subsystems</A>, keyed by host, which contain</li>
<ul>
<li><i><A href="../reference/api/org/eclipse/rse/filters/ISystemFilterPoolReference.html">References</A></i>
to <A href="../reference/api/org/eclipse/rse/filters/ISystemFilterPool.html">filter pools</A>, which are managed by <A href="../reference/api/org/eclipse/rse/filters/ISystemFilterPoolManager.html">filter pool managers</A></li>
<li><i><A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolReference.html">References</A></i>
to <A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPool.html">filter pools</A>, which are managed by <A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolManager.html">filter pool managers</A></li>
</ul>
<!--
<li><A href="../reference/api/org/eclipse/rse/ui/uda/SystemUDTypeElement.html">Named types</A></li>

View file

@ -10,7 +10,7 @@
<body bgcolor="#ffffff">
<h1>RSE Model API</h1>
<p>The front door to accessing the elements of the RSE model is the <A href="../../reference/api/org/eclipse/rse/model/ISystemRegistry.html">ISystemRegistry</A>, which is a
<p>The front door to accessing the elements of the RSE model is the <A href="../../reference/api/org/eclipse/rse/core/model/ISystemRegistry.html">ISystemRegistry</A>, which is a
singleton object accessible via <A href="../../reference/api/org/eclipse/rse/model/SystemStartHere.html#getSystemRegistry()">SystemStartHere.getSystemRegistry()</A>.
</p>
<p>The system registry will get you access to profiles, connections and subsystem factories.

View file

@ -42,11 +42,11 @@ point, you need to know the class or, preferably, interface that the objects imp
</TR>
<TR>
<TD>Profile</TD>
<TD><samp><A href="../../../reference/api/org/eclipse/rse/model/ISystemProfile.html">org.eclipse.rse.model.ISystemProfile</A></samp></TD>
<TD><samp><A href="../../../reference/api/org/eclipse/rse/core/model/ISystemProfile.html">org.eclipse.rse.core.model.ISystemProfile</A></samp></TD>
</TR>
<TR>
<TD>Host</TD>
<TD><samp><A href="../../../reference/api/org/eclipse/rse/model/IHost.html">org.eclipse.rse.model.IHost</A></samp></TD>
<TD><samp><A href="../../../reference/api/org/eclipse/rse/core/model/IHost.html">org.eclipse.rse.core.model.IHost</A></samp></TD>
</TR>
<TR>
<TD>Subsystem</TD>
@ -54,11 +54,11 @@ point, you need to know the class or, preferably, interface that the objects imp
</TR>
<TR>
<TD>Filter pool reference</TD>
<TD><samp><A href="../../../reference/api/org/eclipse/rse/filters/ISystemFilterPoolReference.html">org.eclipse.rse.filters.ISystemFilterPoolReference</A></samp></TD>
<TD><samp><A href="../../../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolReference.html">org.eclipse.rse.core.filters.ISystemFilterPoolReference</A></samp></TD>
</TR>
<TR>
<TD>Filter reference</TD>
<TD><samp><A href="../../../reference/api/org/eclipse/rse/filters/ISystemFilterReference.html">org.eclipse.rse.filters.ISystemFilterReference</A></samp></TD>
<TD><samp><A href="../../../reference/api/org/eclipse/rse/core/filters/ISystemFilterReference.html">org.eclipse.rse.core.filters.ISystemFilterReference</A></samp></TD>
</TR>
</TBODY>
</TABLE>

View file

@ -16,15 +16,15 @@ all system types ("universally").
<p>
To programmatically access the files in a remote system
identified by a particular system connection, use the
<A href="../../reference/api/org/eclipse/rse/model/ISystemRegistry.html">system registry</A> to get to the
<A href="../../reference/api/org/eclipse/rse/model/ISystemRegistry.html#getSubSystemsBySubSystemConfigurationCategory(String, org.eclipse.rse.model.IHost)">file subsystem</A>
<A href="../../reference/api/org/eclipse/rse/core/model/ISystemRegistry.html">system registry</A> to get to the
<A href="../../reference/api/org/eclipse/rse/core/model/ISystemRegistry.html#getSubSystemsBySubSystemConfigurationCategory(String, org.eclipse.rse.core.model.IHost)">file subsystem</A>
for that connection, by passing in the file category as a String. This <A href="../../reference/api/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.html">file subsystem</A> offers methods for accessing the remote files.
</p>
<p>
Similarly, to programmatically run commands in a remote system
identified by a particular system connection, use the
<A href="../../reference/api/org/eclipse/rse/model/ISystemRegistry.html">system registry</A> to get to the
<A href="../../reference/api/org/eclipse/rse/model/ISystemRegistry.html#getSubSystemsBySubSystemConfigurationCategory(String, org.eclipse.rse.model.IHost)">command subsystem</A>
<A href="../../reference/api/org/eclipse/rse/core/model/ISystemRegistry.html">system registry</A> to get to the
<A href="../../reference/api/org/eclipse/rse/core/model/ISystemRegistry.html#getSubSystemsBySubSystemConfigurationCategory(String, org.eclipse.rse.core.model.IHost)">command subsystem</A>
for that connection, by passing in the command category as a String. This <A href="../../reference/api/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystem.html">command subsystem</A> offers methods for running remote commands,
either in a new command shell or an existing command shell. You can also set environment variables
using this subsytem object.

View file

@ -117,7 +117,7 @@ together with the RSE dialog and wizard support.
<p>Often we want to refresh the contents of the Remote Systems view or Table view from within our actions, to visualize
changes to the selected resources. To do this, use the
<samp><A href="../../reference/api/org/eclipse/rse/model/ISystemRegistry.html#fireRemoteResourceChangeEvent(int, java.lang.Object, java.lang.Object, org.eclipse.rse.core.subsystems.ISubSystem, java.lang.String, org.eclipse.jface.viewers.Viewer)">method</a></samp>.
<samp><A href="../../reference/api/org/eclipse/rse/model/SystemRegistry.html#fireRemoteResourceChangeEvent(int, java.lang.Object, java.lang.Object, org.eclipse.rse.core.subsystems.ISubSystem, java.lang.String, org.eclipse.jface.viewers.Viewer)">method</a></samp>.
To get the system registry, use the
<samp><A href="../../reference/api/org/eclipse/rse/model/SystemStartHere.html#getSystemRegistry()">method</a></samp>.
</body>

View file

@ -89,7 +89,7 @@ methods required for uniqueness validation:
<p>The third validator interface is <samp><A href="../../../reference/api/org/eclipse/rse/ui/validators/IValidatorRemoteSelection.html">IValidatorRemoteSelection</A></samp>, which is specifically intended to be used
in the remote resource selection dialogs supplied by the RSE. It allows you to decide when to enable the OK button, based on what
is selected. It contains only the following method:</p>
<samp>public SystemMessage <A href="../../../reference/api/org/eclipse/rse/ui/validators/IValidatorRemoteSelection.html#isValid(org.eclipse.rse.model.IHost, java.lang.Object[], org.eclipse.rse.ui.view.ISystemRemoteElementAdapter[])">isValid(SystemConnection selectedConnection, Object[] selectedObjects, ISystemRemoteElementAdapter[] remoteAdaptersForSelectedObject)</A>;</samp>
<samp>public SystemMessage <A href="../../../reference/api/org/eclipse/rse/ui/validators/IValidatorRemoteSelection.html#isValid(org.eclipse.rse.core.model.IHost, java.lang.Object[], org.eclipse.rse.ui.view.ISystemRemoteElementAdapter[])">isValid(SystemConnection selectedConnection, Object[] selectedObjects, ISystemRemoteElementAdapter[] remoteAdaptersForSelectedObject)</A>;</samp>
<p>You typically won't implement this interface directly, but rather sublcass <samp>ValidatorRemoteSelection</samp>.</p>
<h3>Validator Samples</h3>

View file

@ -42,10 +42,10 @@ the information needed to enable them to in Remote System Explorer.
Remote System Explorer. To use this you need to know the class type
of these objects for the <samp>objectClass</samp> attribute of the <samp>&lt;page&gt;</samp> element:
<ul>
<li>Connections: <samp><A href="../../reference/api/org/eclipse/rse/model/IHost.html">org.eclipse.rse.model.IHost</A></samp>
<li>Connections: <samp><A href="../../reference/api/org/eclipse/rse/core/model/IHost.html">org.eclipse.rse.core.model.IHost</A></samp>
<li>SubSystems: <samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/ISubSystem.html">org.eclipse.rse.core.subsystems.ISubSystem</A></samp>
<li>Filter Pools: <samp><A href="../../reference/api/org/eclipse/rse/filters/ISystemFilterPoolReference.html">org.eclipse.rse.filters.ISystemFilterPoolReference</A></samp>
<li>Filters: <samp><A href="../../reference/api/org/eclipse/rse/filters/ISystemFilterReference.html">org.eclipse.rse.filters.ISystemFilterReference</A></samp>
<li>Filter Pools: <samp><A href="../../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolReference.html">org.eclipse.rse.core.filters.ISystemFilterPoolReference</A></samp>
<li>Filters: <samp><A href="../../reference/api/org/eclipse/rse/core/filters/ISystemFilterReference.html">org.eclipse.rse.core.filters.ISystemFilterReference</A></samp>
</ul>
It is possible to scope your property pages to only appear for certain system types or subsystems, using
the <samp>&lt;filter&gt;</samp> element. For example:<br>
@ -54,7 +54,7 @@ the information needed to enable them to in Remote System Explorer.
&lt;page name=&quot;Team Info&quot;
class=&quot;samples.ui.propertypages.TeamFilterPropertyPage&quot;
id=&quot;samples.ui.pp.filter.team&quot;
objectClass=&quot;org.eclipse.rse.filters.ISystemFilterReference&quot; &gt;
objectClass=&quot;org.eclipse.rse.core.filters.ISystemFilterReference&quot; &gt;
<b>&lt;filter name=&quot;subsystemFactoryId&quot; value=&quot;samples.subsystems.factory&quot;/&gt;</b>
&lt;/page&gt;
&lt;/extension&gt;
@ -68,10 +68,10 @@ the information needed to enable them to in Remote System Explorer.
To use this you need to know the class type of these objects for the <samp>objectClass</samp> attribute
of the &lt;objectContribution&gt; element:
<ul>
<li>Connections: <samp><A href="../../reference/api/org/eclipse/rse/model/IHost.html">org.eclipse.rse.model.IHost</A></samp>
<li>Connections: <samp><A href="../../reference/api/org/eclipse/rse/core/model/IHost.html">org.eclipse.rse.core.model.IHost</A></samp>
<li>SubSystems: <samp><A href="../../reference/api/org/eclipse/rse/core/subsystems/ISubSystem.html">org.eclipse.rse.core.subsystems.ISubSystem</A></samp>
<li>Filter Pools: <samp><A href="../../reference/api/org/eclipse/rse/filters/ISystemFilterPoolReference.html">org.eclipse.rse.filters.ISystemFilterPoolReference</A></samp>
<li>Filters: <samp><A href="../../reference/api/org/eclipse/rse/filters/ISystemFilterReference.html">org.eclipse.rse.filters.ISystemFilterReference</A></samp>
<li>Filter Pools: <samp><A href="../../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolReference.html">org.eclipse.rse.core.filters.ISystemFilterPoolReference</A></samp>
<li>Filters: <samp><A href="../../reference/api/org/eclipse/rse/core/filters/ISystemFilterReference.html">org.eclipse.rse.core.filters.ISystemFilterReference</A></samp>
</ul>
It is possible to scope your actions to only appear for certain system types or subsystems, using
the <samp>&lt;filter&gt;</samp> element. For example:<br>
@ -79,7 +79,7 @@ the information needed to enable them to in Remote System Explorer.
&lt;extension point=&quot;org.eclipse.ui.popupMenus&quot;&gt;
&lt;objectContribution
id =&quot;samples.ui.actions.TeamFilterActions&quot;
objectClass=&quot;org.eclipse.rse.filters.ISystemFilterReference&quot;&gt;
objectClass=&quot;org.eclipse.rse.core.filters.ISystemFilterReference&quot;&gt;
<b>&lt;filter name=&quot;subsystemFactoryId&quot; value=&quot;samples.subsystems.factory&quot;/&gt;</b>
&lt;action id=&quot;samples.ui.actions.TeamFilterAction1&quot;
label=&quot;Sample Team Filter Action&quot;
@ -128,7 +128,7 @@ on the <samp>category</samp> of the subsystem factory that created this object's
You can specify multiple values if you comma-separate them.
</ul>
<p>For system filter objects of type <samp>org.eclipse.rse.filters.ISystemFilterReference</samp>,
<p>For system filter objects of type <samp>org.eclipse.rse.core.filters.ISystemFilterReference</samp>,
the following names are also supported:
<ul>
<li><b><samp>"filterType"</samp></b>. Will test the <i>value</i> for an exact match on the selected filter's

View file

@ -25,7 +25,7 @@ as it has only one element, <b><samp>&lt;configuration&gt;</samp></b>, with only
<ul>
<li><b>id</b>. Unique id for the extension, as required for all extensions. However, in this case it is used to create
folders within the <samp>RemoteSystemsConnections</samp> project, where all Remote Systems Explorer data is stored.
There is also a way to <A href="../../reference/api/org/eclipse/rse/model/ISystemRegistry.html#getSubSystemConfiguration(java.lang.String)">query</A> a subsystem configuration
There is also a way to <A href="../../reference/api/org/eclipse/rse/core/model/ISystemRegistry.html#getSubSystemConfiguration(java.lang.String)">query</A> a subsystem configuration
object via its ID.<li><b>vendor</b>. Your company name, shown in properties dialog for subsystems created by this subsystem configuration.
<li><b>icon</b>. The icon displayed in the Remote Systems view for each subsystem created by this subsystem configuration.
<li><b>iconlive</b>. The icon used when the subsystem is physically connected to its remote system.
@ -225,11 +225,11 @@ following summarizes the minimum set of classes you will be creating in order to
<samp><a href="../../reference/api/org/eclipse/rse/ui/filters/actions/SystemChangeFilterAction.html#configureFilterDialog(org.eclipse.rse.ui.filters.dialogs.SystemChangeFilterDialog)">configureFilterDialog</a></samp>
and in it calling <samp><a href="../../reference/api/org/eclipse/rse/ui/filters/dialogs/SystemChangeFilterDialog.html#setFilterStringEditPane(org.eclipse.rse.ui.filters.SystemFilterStringEditPane)">setFilterStringEditPane</a></samp>
on the given dialog.
<li type="i">Override the <samp><a href="../../reference/api/org/eclipse/rse/core/subsystems/util/ISubsystemConfigurationAdapter.html#getNewFilterPoolFilterAction(org.eclipse.rse.filters.ISystemFilterPool, org.eclipse.swt.widgets.Shell)">getNewFilterPoolFilterAction(SystemFilterPool, Shell)</a></samp>
<li type="i">Override the <samp><a href="../../reference/api/org/eclipse/rse/core/subsystems/util/ISubsystemConfigurationAdapter.html#getNewFilterPoolFilterAction(org.eclipse.rse.core.filters.ISystemFilterPool, org.eclipse.swt.widgets.Shell)">getNewFilterPoolFilterAction(SystemFilterPool, Shell)</a></samp>
method in your subsystem factory, to return an instance of your new-filter action.
You can actually avoid creating an action subclass if you choose, by calling the configuration methods
in the RSE-supplied <a href="../../reference/api/org/eclipse/rse/ui/filters/actions/SystemNewFilterAction.html">new-filter action class</a>.
<li type="i">Override the <samp><a href="../../reference/api/org/eclipse/rse/core/subsystems/util/ISubsystemConfigurationAdapter.html#getChangeFilterAction(org.eclipse.rse.filters.ISystemFilter, org.eclipse.swt.widgets.Shell)">getChangeFilterAction(SystemFilter, Shell)</a></samp>
<li type="i">Override the <samp><a href="../../reference/api/org/eclipse/rse/core/subsystems/util/ISubsystemConfigurationAdapter.html#getChangeFilterAction(org.eclipse.rse.core.filters.ISystemFilter, org.eclipse.swt.widgets.Shell)">getChangeFilterAction(SystemFilter, Shell)</a></samp>
method in your subsystem factory, to return an instance of your change-filter action.
You can actually avoid creating an action subclass if you choose, by calling the configuration methods
in the RSE-supplied <a href="../../reference/api/org/eclipse/rse/ui/filters/actions/SystemChangeFilterAction.html">change-filter action class</a>.

View file

@ -1,100 +1,100 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
<title>DeveloperConnectorService Class After Editing</title>
</head>
<body>
<h1>DeveloperConnectorService Class After Editing</h1>
<pre><samp>
package samples.subsystems;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.rse.core.subsystems.AbstractConnectorService;
import org.eclipse.rse.model.IHost;
import samples.RSESamplesPlugin;
/**
* Our system class that manages connecting to, and disconnecting from,
* our remote server-side code.
*/
public class DeveloperConnectorService extends AbstractConnectorService {
<strong>private boolean connected = false;</strong>
/**
* Constructor for DeveloperConnectorService.
* @param host
*/
public DeveloperConnectorService(IHost host)
{
super(
RSESamplesPlugin.getResourceString("connectorservice.devr.name"),
RSESamplesPlugin.getResourceString("connectorservice.devr.desc"),
host,
0
);
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.IConnectorService#isConnected()
*/
public boolean isConnected()
{
return connected;
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.AbstractConnectorService#internalConnect(org.eclipse.core.runtime.IProgressMonitor)
*/
protected void internalConnect(IProgressMonitor monitor) throws Exception
{
super.internalConnect(monitor);
// pretend. Normally, we'd connect to our remote server-side code here
connected=true;
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.AbstractConnectorService#internalDisconnect(org.eclipse.core.runtime.IProgressMonitor)
*/
public void internalDisconnect(IProgressMonitor monitor) throws Exception
{
super.internalDisconnect(monitor);
// pretend. Normally, we'd disconnect from our remote server-side code here
connected=false;
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.IConnectorService#supportsRemoteServerLaunching()
*/
public boolean supportsRemoteServerLaunching()
{
return false;
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.IConnectorService#hasRemoteServerLauncherProperties()
*/
public boolean hasRemoteServerLauncherProperties()
{
return false;
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.IConnectorService#supportsServerLaunchProperties()
*/
public boolean supportsServerLaunchProperties()
{
return false;
}
}
</samp></pre>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
<title>DeveloperConnectorService Class After Editing</title>
</head>
<body>
<h1>DeveloperConnectorService Class After Editing</h1>
<pre><samp>
package samples.subsystems;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.rse.core.subsystems.AbstractConnectorService;
import org.eclipse.rse.core.model.IHost;
import samples.RSESamplesPlugin;
/**
* Our system class that manages connecting to, and disconnecting from,
* our remote server-side code.
*/
public class DeveloperConnectorService extends AbstractConnectorService {
<strong>private boolean connected = false;</strong>
/**
* Constructor for DeveloperConnectorService.
* @param host
*/
public DeveloperConnectorService(IHost host)
{
super(
RSESamplesPlugin.getResourceString("connectorservice.devr.name"),
RSESamplesPlugin.getResourceString("connectorservice.devr.desc"),
host,
0
);
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.IConnectorService#isConnected()
*/
public boolean isConnected()
{
return connected;
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.AbstractConnectorService#internalConnect(org.eclipse.core.runtime.IProgressMonitor)
*/
protected void internalConnect(IProgressMonitor monitor) throws Exception
{
super.internalConnect(monitor);
// pretend. Normally, we'd connect to our remote server-side code here
connected=true;
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.AbstractConnectorService#internalDisconnect(org.eclipse.core.runtime.IProgressMonitor)
*/
public void internalDisconnect(IProgressMonitor monitor) throws Exception
{
super.internalDisconnect(monitor);
// pretend. Normally, we'd disconnect from our remote server-side code here
connected=false;
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.IConnectorService#supportsRemoteServerLaunching()
*/
public boolean supportsRemoteServerLaunching()
{
return false;
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.IConnectorService#hasRemoteServerLauncherProperties()
*/
public boolean hasRemoteServerLauncherProperties()
{
return false;
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.IConnectorService#supportsServerLaunchProperties()
*/
public boolean supportsServerLaunchProperties()
{
return false;
}
}
</samp></pre>
</body>
</html>

View file

@ -1,94 +1,94 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
<title>DeveloperConnectorServiceManager Class After Editing</title>
</head>
<body>
<h1>DeveloperConnectorServiceManager Class After Editing</h1>
<pre><samp>
/********************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
*
* Initial Contributors:
* The following IBM employees contributed to the Remote System Explorer
* component that contains this file: David McKnight, Kushal Munir,
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
********************************************************************************/
package samples.subsystems;
import org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager;
import org.eclipse.rse.core.subsystems.IConnectorService;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.model.IHost;
/**
* This class manages our DeveloperConnectorService objects, so that if we
* ever have multiple subsystem configurations, different subsystems can share
* the same system object if they share the communication layer.
*/
public class DeveloperConnectorServiceManager extends
AbstractConnectorServiceManager {
<strong>private static DeveloperConnectorServiceManager inst;</strong>
/**
* Constructor for DeveloperConnectorServiceManager.
*/
public DeveloperConnectorServiceManager()
{
super();
}
<strong>/**
* Return singleton instance
*/
public static DeveloperConnectorServiceManager getTheDeveloperConnectorServiceManager()
{
if (inst == null)
inst = new DeveloperConnectorServiceManager();
return inst;
}</strong>
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#createConnectorService(org.eclipse.rse.model.IHost)
*/
public IConnectorService createConnectorService(IHost host)
{
<strong>return new DeveloperConnectorService(host);</strong>
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#sharesSystem(org.eclipse.rse.core.subsystems.ISubSystem)
*/
public boolean sharesSystem(ISubSystem otherSubSystem)
{
<strong>return (otherSubSystem instanceof IDeveloperSubSystem);</strong>
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#getSubSystemCommonInterface(org.eclipse.rse.core.subsystems.ISubSystem)
*/
public Class getSubSystemCommonInterface(ISubSystem subsystem)
{
<strong>return IDeveloperSubSystem.class;</strong>
}
}
</samp></pre>
</body>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
<title>DeveloperConnectorServiceManager Class After Editing</title>
</head>
<body>
<h1>DeveloperConnectorServiceManager Class After Editing</h1>
<pre><samp>
/********************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
*
* Initial Contributors:
* The following IBM employees contributed to the Remote System Explorer
* component that contains this file: David McKnight, Kushal Munir,
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
********************************************************************************/
package samples.subsystems;
import org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager;
import org.eclipse.rse.core.subsystems.IConnectorService;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.model.IHost;
/**
* This class manages our DeveloperConnectorService objects, so that if we
* ever have multiple subsystem configurations, different subsystems can share
* the same system object if they share the communication layer.
*/
public class DeveloperConnectorServiceManager extends
AbstractConnectorServiceManager {
<strong>private static DeveloperConnectorServiceManager inst;</strong>
/**
* Constructor for DeveloperConnectorServiceManager.
*/
public DeveloperConnectorServiceManager()
{
super();
}
<strong>/**
* Return singleton instance
*/
public static DeveloperConnectorServiceManager getTheDeveloperConnectorServiceManager()
{
if (inst == null)
inst = new DeveloperConnectorServiceManager();
return inst;
}</strong>
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#createConnectorService(org.eclipse.rse.core.model.IHost)
*/
public IConnectorService createConnectorService(IHost host)
{
<strong>return new DeveloperConnectorService(host);</strong>
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#sharesSystem(org.eclipse.rse.core.subsystems.ISubSystem)
*/
public boolean sharesSystem(ISubSystem otherSubSystem)
{
<strong>return (otherSubSystem instanceof IDeveloperSubSystem);</strong>
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#getSubSystemCommonInterface(org.eclipse.rse.core.subsystems.ISubSystem)
*/
public Class getSubSystemCommonInterface(ISubSystem subsystem)
{
<strong>return IDeveloperSubSystem.class;</strong>
}
}
</samp></pre>
</body>
</html>

View file

@ -1,202 +1,202 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
<title>DeveloperSubSystem Class After Editing</title>
</head>
<body bgcolor="#ffffff">
<h1>DeveloperSubSystem Class After Editing</h1>
<pre><samp>
package samples.subsystems;
<strong>import java.util.Vector;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.rse.core.subsystems.IConnectorService;</strong>
import org.eclipse.rse.core.subsystems.SubSystem;
<strong>import org.eclipse.rse.model.IHost;
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
import samples.model.DeveloperResource;
import samples.model.TeamResource;</strong>
<strong>/**
* This is our subsystem, which manages the remote connection and resources for
* a particular system connection object.
*/</strong>
public class DeveloperSubSystem extends SubSystem
{
<strong>private TeamResource[] teams; // faked-out master list of teams</strong>
<strong>private Vector devVector = new Vector(); // faked-out master list of developers</strong>
<strong>private static int employeeId = 123456; // employee Id factory</strong>
/**
* @param host
* @param connectorService
*/
public DeveloperSubSystem(IHost host, IConnectorService connectorService) {
super(host, connectorService);
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.SubSystem#initializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
*/
public void initializeSubSystem(IProgressMonitor monitor) {
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.ISubSystem#uninitializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
*/
public void uninitializeSubSystem(IProgressMonitor monitor) {
}
<strong>/**
* For drag and drop, and clipboard support of remote objects.
*
* Return the remote object within the subsystem that corresponds to
* the specified unique ID. Because each subsystem maintains it's own
* objects, it's the responsability of the subsystem to determine
* how an ID (or key) for a given object maps to the real object.
* By default this returns null.
*/
public Object getObjectWithAbsoluteName(String key)
{
// Functional opposite of getAbsoluteName(Object) in our resource adapters
if (key.startsWith("Team_")) //$NON-NLS-1$
{
String teamName = key.substring(5);
TeamResource[] allTeams = getAllTeams();
for (int idx=0; idx &lt; allTeams.length; idx++)
if (allTeams[idx].getName().equals(teamName))
return allTeams[idx];
}
else if (key.startsWith("Devr_")) //$NON-NLS-1$
{
String devrId = key.substring(5);
DeveloperResource[] devrs = getAllDevelopers();
for (int idx=0; idx &lt; devrs.length; idx++)
if (devrs[idx].getId().equals(devrId))
return devrs[idx];
}
return null;
}</strong>
<strong>/**
* When a filter is expanded, this is called for each filter string in the filter.
* Using the criteria of the filter string, it must return objects representing remote resources.
* For us, this will be an array of TeamResource objects.
*
* @param monitor - the progress monitor in effect while this operation performs
* @param filterString - one of the filter strings from the expanded filter.
*/
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString)
throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException
{
// Fake it out for now and return dummy list.
// In reality, this would communicate with remote server-side code/data.
TeamResource[] allTeams = getAllTeams();
// Now, subset master list, based on filter string...
NamePatternMatcher subsetter = new NamePatternMatcher(filterString);
Vector v = new Vector();
for (int idx = 0; idx &lt; allTeams.length; idx++)
{
if (subsetter.matches(allTeams[idx].getName()))
v.addElement(allTeams[idx]);
}
TeamResource[] teams = new TeamResource[v.size()];
for (int idx=0; idx &lt; v.size(); idx++)
teams[idx] = (TeamResource)v.elementAt(idx);
return teams;
}</strong>
<strong>/**
* When a remote resource is expanded, this is called to return the children of the resource, if
* the resource's adapter states the resource object is expandable.
* For us, it is a Team resource that was expanded, and an array of Developer resources will be returned.
*
* @param monitor - the progress monitor in effect while this operation performs
* @param parent - the parent resource object being expanded
* @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported.
*/
<a id="resolveFilterString"/>protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString)
throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException
{
// typically we ignore the filter string as it is always "*"
// until support is added for "quick filters" the user can specify/select
// at the time they expand a remote resource.
TeamResource team = (TeamResource)parent;
return team.getDevelopers();
}</strong>
<strong>// ------------------
// Our own methods...
// ------------------</strong>
<strong>/**
* Get the list of all teams. Normally this would involve a trip the server, but we
* fake it out and return a hard-coded local list.
*/
public TeamResource[] getAllTeams()
{
if (teams == null)
teams = createTeams("Team ", 4);
return teams;
}</strong>
<strong>/**
* Get the list of all developers. Normally this would involve a trip the server, but we
* fake it out and return a hard-coded local list.
*/
public DeveloperResource[] getAllDevelopers()
{
DeveloperResource[] allDevrs = new DeveloperResource[devVector.size()];
for (int idx = 0; idx &lt; allDevrs.length; idx++)
allDevrs[idx] = (DeveloperResource)devVector.elementAt(idx);
return allDevrs;
}</strong>
<strong>/*
* Create and return a dummy set of teams
*/
private TeamResource[] createTeams(String prefix, int howMany)
{
TeamResource[] teams = new TeamResource[howMany];
for (int idx = 0; idx &lt; teams.length; idx++)
{
teams[idx] = new TeamResource(this);
teams[idx].setName(prefix + (idx+1));
teams[idx].setDevelopers(createDevelopers(teams[idx].getName()+" developer",idx+1));
}
return teams;
}</strong>
<strong>/*
* Create and return a dummy set of developers
*/
private DeveloperResource[] createDevelopers(String prefix, int nbr)
{
DeveloperResource[] devrs = new DeveloperResource[nbr];
for (int idx=0; idx &lt; devrs.length; idx++)
{
devrs[idx] = new DeveloperResource(this);
devrs[idx].setName(prefix + (idx+1));
devrs[idx].setId(Integer.toString(employeeId++));
devrs[idx].setDeptNbr(Integer.toString((idx+1)*100));
devVector.add(devrs[idx]); // update master list
}
return devrs;
}</strong>
}
</samp></pre>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
<title>DeveloperSubSystem Class After Editing</title>
</head>
<body bgcolor="#ffffff">
<h1>DeveloperSubSystem Class After Editing</h1>
<pre><samp>
package samples.subsystems;
<strong>import java.util.Vector;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.rse.core.subsystems.IConnectorService;</strong>
import org.eclipse.rse.core.subsystems.SubSystem;
<strong>import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
import samples.model.DeveloperResource;
import samples.model.TeamResource;</strong>
<strong>/**
* This is our subsystem, which manages the remote connection and resources for
* a particular system connection object.
*/</strong>
public class DeveloperSubSystem extends SubSystem
{
<strong>private TeamResource[] teams; // faked-out master list of teams</strong>
<strong>private Vector devVector = new Vector(); // faked-out master list of developers</strong>
<strong>private static int employeeId = 123456; // employee Id factory</strong>
/**
* @param host
* @param connectorService
*/
public DeveloperSubSystem(IHost host, IConnectorService connectorService) {
super(host, connectorService);
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.SubSystem#initializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
*/
public void initializeSubSystem(IProgressMonitor monitor) {
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.ISubSystem#uninitializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
*/
public void uninitializeSubSystem(IProgressMonitor monitor) {
}
<strong>/**
* For drag and drop, and clipboard support of remote objects.
*
* Return the remote object within the subsystem that corresponds to
* the specified unique ID. Because each subsystem maintains it's own
* objects, it's the responsability of the subsystem to determine
* how an ID (or key) for a given object maps to the real object.
* By default this returns null.
*/
public Object getObjectWithAbsoluteName(String key)
{
// Functional opposite of getAbsoluteName(Object) in our resource adapters
if (key.startsWith("Team_")) //$NON-NLS-1$
{
String teamName = key.substring(5);
TeamResource[] allTeams = getAllTeams();
for (int idx=0; idx &lt; allTeams.length; idx++)
if (allTeams[idx].getName().equals(teamName))
return allTeams[idx];
}
else if (key.startsWith("Devr_")) //$NON-NLS-1$
{
String devrId = key.substring(5);
DeveloperResource[] devrs = getAllDevelopers();
for (int idx=0; idx &lt; devrs.length; idx++)
if (devrs[idx].getId().equals(devrId))
return devrs[idx];
}
return null;
}</strong>
<strong>/**
* When a filter is expanded, this is called for each filter string in the filter.
* Using the criteria of the filter string, it must return objects representing remote resources.
* For us, this will be an array of TeamResource objects.
*
* @param monitor - the progress monitor in effect while this operation performs
* @param filterString - one of the filter strings from the expanded filter.
*/
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString)
throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException
{
// Fake it out for now and return dummy list.
// In reality, this would communicate with remote server-side code/data.
TeamResource[] allTeams = getAllTeams();
// Now, subset master list, based on filter string...
NamePatternMatcher subsetter = new NamePatternMatcher(filterString);
Vector v = new Vector();
for (int idx = 0; idx &lt; allTeams.length; idx++)
{
if (subsetter.matches(allTeams[idx].getName()))
v.addElement(allTeams[idx]);
}
TeamResource[] teams = new TeamResource[v.size()];
for (int idx=0; idx &lt; v.size(); idx++)
teams[idx] = (TeamResource)v.elementAt(idx);
return teams;
}</strong>
<strong>/**
* When a remote resource is expanded, this is called to return the children of the resource, if
* the resource's adapter states the resource object is expandable.
* For us, it is a Team resource that was expanded, and an array of Developer resources will be returned.
*
* @param monitor - the progress monitor in effect while this operation performs
* @param parent - the parent resource object being expanded
* @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported.
*/
<a id="resolveFilterString"/>protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString)
throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException
{
// typically we ignore the filter string as it is always "*"
// until support is added for "quick filters" the user can specify/select
// at the time they expand a remote resource.
TeamResource team = (TeamResource)parent;
return team.getDevelopers();
}</strong>
<strong>// ------------------
// Our own methods...
// ------------------</strong>
<strong>/**
* Get the list of all teams. Normally this would involve a trip the server, but we
* fake it out and return a hard-coded local list.
*/
public TeamResource[] getAllTeams()
{
if (teams == null)
teams = createTeams("Team ", 4);
return teams;
}</strong>
<strong>/**
* Get the list of all developers. Normally this would involve a trip the server, but we
* fake it out and return a hard-coded local list.
*/
public DeveloperResource[] getAllDevelopers()
{
DeveloperResource[] allDevrs = new DeveloperResource[devVector.size()];
for (int idx = 0; idx &lt; allDevrs.length; idx++)
allDevrs[idx] = (DeveloperResource)devVector.elementAt(idx);
return allDevrs;
}</strong>
<strong>/*
* Create and return a dummy set of teams
*/
private TeamResource[] createTeams(String prefix, int howMany)
{
TeamResource[] teams = new TeamResource[howMany];
for (int idx = 0; idx &lt; teams.length; idx++)
{
teams[idx] = new TeamResource(this);
teams[idx].setName(prefix + (idx+1));
teams[idx].setDevelopers(createDevelopers(teams[idx].getName()+" developer",idx+1));
}
return teams;
}</strong>
<strong>/*
* Create and return a dummy set of developers
*/
private DeveloperResource[] createDevelopers(String prefix, int nbr)
{
DeveloperResource[] devrs = new DeveloperResource[nbr];
for (int idx=0; idx &lt; devrs.length; idx++)
{
devrs[idx] = new DeveloperResource(this);
devrs[idx].setName(prefix + (idx+1));
devrs[idx].setId(Integer.toString(employeeId++));
devrs[idx].setDeptNbr(Integer.toString((idx+1)*100));
devVector.add(devrs[idx]); // update master list
}
return devrs;
}</strong>
}
</samp></pre>
</body>
</html>

View file

@ -1,233 +1,233 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
<title>DeveloperSubSystem Class After Editing Supporting Multiple Filter Types</title>
</head>
<body>
<h1>DeveloperSubSystem Class After Editing Supporting Multiple Filter Types</h1>
<pre><samp>
package samples.subsystems;
import java.util.Vector;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.rse.core.subsystems.IConnectorService;
import org.eclipse.rse.core.subsystems.SubSystem;
import org.eclipse.rse.model.IHost;
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
import samples.model.DeveloperResource;
import samples.model.TeamResource;
/**
* This is our subsystem, which manages the remote connection and resources for
* a particular system connection object.
*/
public class DeveloperSubSystem extends SubSystem
{
private TeamResource[] teams; // faked-out master list of teams
private Vector devVector = new Vector(); // faked-out master list of developers
private static int employeeId = 123456; // employee Id factory
/**
* @param host
* @param connectorService
*/
public DeveloperSubSystem(IHost host, IConnectorService connectorService) {
super(host, connectorService);
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.SubSystem#initializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
*/
public void initializeSubSystem(IProgressMonitor monitor) {
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.ISubSystem#uninitializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
*/
public void uninitializeSubSystem(IProgressMonitor monitor) {
}
/**
* For drag and drop, and clipboard support of remote objects.
*
* Return the remote object within the subsystem that corresponds to
* the specified unique ID. Because each subsystem maintains it's own
* objects, it's the responsability of the subsystem to determine
* how an ID (or key) for a given object maps to the real object.
* By default this returns null.
*/
public Object getObjectWithAbsoluteName(String key)
{
// Functional opposite of getAbsoluteName(Object) in our resource adapters
if (key.startsWith("Team_"))
{
String teamName = key.substring(5);
TeamResource[] allTeams = getAllTeams();
for (int idx = 0; idx &lt; allTeams.length; idx++)
if (allTeams[idx].getName().equals(teamName))
return allTeams[idx];
}
else if (key.startsWith("Devr_"))
{
String devrId = key.substring(5);
DeveloperResource[] devrs = getAllDevelopers();
for (int idx=0; idx &lt; devrs.length; idx++)
if (devrs[idx].getId().equals(devrId))
return devrs[idx];
}
return null;
}
/**
* When a filter is expanded, this is called for each filter string in the filter.
* Using the criteria of the filter string, it must return objects representing remote resources.
* For us, this will be an array of TeamResource objects.
*
* @param monitor - the progress monitor in effect while this operation performs
* @param filterString - one of the filter strings from the expanded filter.
*/
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString)
throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException
{
<strong>int slashIdx = filterString.indexOf('/');
if (slashIdx &lt; 0)
{</strong>
// Fake it out for now and return dummy list.
// In reality, this would communicate with remote server-side code/data.
TeamResource[] allTeams = getAllTeams();
// Now, subset master list, based on filter string...
NamePatternMatcher subsetter = new NamePatternMatcher(filterString);
Vector v = new Vector();
for (int idx=0; idx &lt1; allTeams.length; idx++)
{
if (subsetter.matches(allTeams[idx].getName()))
v.addElement(allTeams[idx]);
}
TeamResource[] teams = new TeamResource[v.size()];
for (int idx=0; idx &lt; v.size(); idx++)
teams[idx] = (TeamResource)v.elementAt(idx);
return teams;
<strong>}
else
{
String teamName = filterString.substring(0, slashIdx);
String devrName = filterString.substring(slashIdx+1);
TeamResource[] allTeams = getAllTeams();
TeamResource match = null;
for (int idx=0; (match==null) && (idx &lt; allTeams.length); idx++)
if (allTeams[idx].getName().equals(teamName))
match = allTeams[idx];
if (match != null)
{
DeveloperResource[] allDevrs = match.getDevelopers();
// Now, subset master list, based on filter string...
NamePatternMatcher subsetter = new NamePatternMatcher(devrName);
Vector v = new Vector();
for (int idx=0; idx &lt; allDevrs.length; idx++)
{
if (subsetter.matches(allDevrs[idx].getName()))
v.addElement(allDevrs[idx]);
}
DeveloperResource[] devrs = new DeveloperResource[v.size()];
for (int idx=0; idx &lt; v.size(); idx++)
devrs[idx] = (DeveloperResource)v.elementAt(idx);
return devrs;
}
}
return null;</strong>
}
/**
* When a remote resource is expanded, this is called to return the children of the resource, if
* the resource's adapter states the resource object is expandable. <br>
* For us, it is a Team resource that was expanded, and an array of Developer resources will be returned.
*
* @param monitor - the progress monitor in effect while this operation performs
* @param parent - the parent resource object being expanded
* @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported.
*/
protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString)
throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException
{
// typically we ignore the filter string as it is always "*"
// until support is added for "quick filters" the user can specify/select
// at the time they expand a remote resource.
TeamResource team = (TeamResource)parent;
return team.getDevelopers();
}
// ------------------
// Our own methods...
// ------------------
/**
* Get the list of all teams. Normally this would involve a trip the server, but we
* fake it out and return a hard-coded local list.
*/
public TeamResource[] getAllTeams()
{
if (teams == null)
teams = createTeams("Team ", 4);
return teams;
}
/**
* Get the list of all developers. Normally this would involve a trip the server, but we
* fake it out and return a hard-coded local list.
*/
public DeveloperResource[] getAllDevelopers()
{
DeveloperResource[] allDevrs = new DeveloperResource[devVector.size()];
for (int idx=0; idx &lt; allDevrs.length; idx++)
allDevrs[idx] = (DeveloperResource)devVector.elementAt(idx);
return allDevrs;
}
/*
* Create and return a dummy set of teams
*/
private TeamResource[] createTeams(String prefix, int howMany)
{
TeamResource[] teams = new TeamResource[howMany];
for (int idx=0; idx &lt; teams.length; idx++)
{
teams[idx] = new TeamResource(this);
teams[idx].setName(prefix + (idx+1));
teams[idx].setDevelopers(createDevelopers(teams[idx].getName()+" developer",idx+1));
}
return teams;
}
/*
* Create and return a dummy set of developers
*/
private DeveloperResource[] createDevelopers(String prefix, int nbr)
{
DeveloperResource[] devrs = new DeveloperResource[nbr];
for (int idx=0; idx &lt; devrs.length; idx++)
{
devrs[idx] = new DeveloperResource(this);
devrs[idx].setName(prefix + (idx+1));
devrs[idx].setId(Integer.toString(employeeId++));
devrs[idx].setDeptNbr(Integer.toString((idx+1)*100));
devVector.add(devrs[idx]); // update master list
}
return devrs;
}
}
</samp></pre>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
<title>DeveloperSubSystem Class After Editing Supporting Multiple Filter Types</title>
</head>
<body>
<h1>DeveloperSubSystem Class After Editing Supporting Multiple Filter Types</h1>
<pre><samp>
package samples.subsystems;
import java.util.Vector;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.rse.core.subsystems.IConnectorService;
import org.eclipse.rse.core.subsystems.SubSystem;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
import samples.model.DeveloperResource;
import samples.model.TeamResource;
/**
* This is our subsystem, which manages the remote connection and resources for
* a particular system connection object.
*/
public class DeveloperSubSystem extends SubSystem
{
private TeamResource[] teams; // faked-out master list of teams
private Vector devVector = new Vector(); // faked-out master list of developers
private static int employeeId = 123456; // employee Id factory
/**
* @param host
* @param connectorService
*/
public DeveloperSubSystem(IHost host, IConnectorService connectorService) {
super(host, connectorService);
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.SubSystem#initializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
*/
public void initializeSubSystem(IProgressMonitor monitor) {
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.ISubSystem#uninitializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
*/
public void uninitializeSubSystem(IProgressMonitor monitor) {
}
/**
* For drag and drop, and clipboard support of remote objects.
*
* Return the remote object within the subsystem that corresponds to
* the specified unique ID. Because each subsystem maintains it's own
* objects, it's the responsability of the subsystem to determine
* how an ID (or key) for a given object maps to the real object.
* By default this returns null.
*/
public Object getObjectWithAbsoluteName(String key)
{
// Functional opposite of getAbsoluteName(Object) in our resource adapters
if (key.startsWith("Team_"))
{
String teamName = key.substring(5);
TeamResource[] allTeams = getAllTeams();
for (int idx = 0; idx &lt; allTeams.length; idx++)
if (allTeams[idx].getName().equals(teamName))
return allTeams[idx];
}
else if (key.startsWith("Devr_"))
{
String devrId = key.substring(5);
DeveloperResource[] devrs = getAllDevelopers();
for (int idx=0; idx &lt; devrs.length; idx++)
if (devrs[idx].getId().equals(devrId))
return devrs[idx];
}
return null;
}
/**
* When a filter is expanded, this is called for each filter string in the filter.
* Using the criteria of the filter string, it must return objects representing remote resources.
* For us, this will be an array of TeamResource objects.
*
* @param monitor - the progress monitor in effect while this operation performs
* @param filterString - one of the filter strings from the expanded filter.
*/
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString)
throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException
{
<strong>int slashIdx = filterString.indexOf('/');
if (slashIdx &lt; 0)
{</strong>
// Fake it out for now and return dummy list.
// In reality, this would communicate with remote server-side code/data.
TeamResource[] allTeams = getAllTeams();
// Now, subset master list, based on filter string...
NamePatternMatcher subsetter = new NamePatternMatcher(filterString);
Vector v = new Vector();
for (int idx=0; idx &lt1; allTeams.length; idx++)
{
if (subsetter.matches(allTeams[idx].getName()))
v.addElement(allTeams[idx]);
}
TeamResource[] teams = new TeamResource[v.size()];
for (int idx=0; idx &lt; v.size(); idx++)
teams[idx] = (TeamResource)v.elementAt(idx);
return teams;
<strong>}
else
{
String teamName = filterString.substring(0, slashIdx);
String devrName = filterString.substring(slashIdx+1);
TeamResource[] allTeams = getAllTeams();
TeamResource match = null;
for (int idx=0; (match==null) && (idx &lt; allTeams.length); idx++)
if (allTeams[idx].getName().equals(teamName))
match = allTeams[idx];
if (match != null)
{
DeveloperResource[] allDevrs = match.getDevelopers();
// Now, subset master list, based on filter string...
NamePatternMatcher subsetter = new NamePatternMatcher(devrName);
Vector v = new Vector();
for (int idx=0; idx &lt; allDevrs.length; idx++)
{
if (subsetter.matches(allDevrs[idx].getName()))
v.addElement(allDevrs[idx]);
}
DeveloperResource[] devrs = new DeveloperResource[v.size()];
for (int idx=0; idx &lt; v.size(); idx++)
devrs[idx] = (DeveloperResource)v.elementAt(idx);
return devrs;
}
}
return null;</strong>
}
/**
* When a remote resource is expanded, this is called to return the children of the resource, if
* the resource's adapter states the resource object is expandable. <br>
* For us, it is a Team resource that was expanded, and an array of Developer resources will be returned.
*
* @param monitor - the progress monitor in effect while this operation performs
* @param parent - the parent resource object being expanded
* @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported.
*/
protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString)
throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException
{
// typically we ignore the filter string as it is always "*"
// until support is added for "quick filters" the user can specify/select
// at the time they expand a remote resource.
TeamResource team = (TeamResource)parent;
return team.getDevelopers();
}
// ------------------
// Our own methods...
// ------------------
/**
* Get the list of all teams. Normally this would involve a trip the server, but we
* fake it out and return a hard-coded local list.
*/
public TeamResource[] getAllTeams()
{
if (teams == null)
teams = createTeams("Team ", 4);
return teams;
}
/**
* Get the list of all developers. Normally this would involve a trip the server, but we
* fake it out and return a hard-coded local list.
*/
public DeveloperResource[] getAllDevelopers()
{
DeveloperResource[] allDevrs = new DeveloperResource[devVector.size()];
for (int idx=0; idx &lt; allDevrs.length; idx++)
allDevrs[idx] = (DeveloperResource)devVector.elementAt(idx);
return allDevrs;
}
/*
* Create and return a dummy set of teams
*/
private TeamResource[] createTeams(String prefix, int howMany)
{
TeamResource[] teams = new TeamResource[howMany];
for (int idx=0; idx &lt; teams.length; idx++)
{
teams[idx] = new TeamResource(this);
teams[idx].setName(prefix + (idx+1));
teams[idx].setDevelopers(createDevelopers(teams[idx].getName()+" developer",idx+1));
}
return teams;
}
/*
* Create and return a dummy set of developers
*/
private DeveloperResource[] createDevelopers(String prefix, int nbr)
{
DeveloperResource[] devrs = new DeveloperResource[nbr];
for (int idx=0; idx &lt; devrs.length; idx++)
{
devrs[idx] = new DeveloperResource(this);
devrs[idx].setName(prefix + (idx+1));
devrs[idx].setId(Integer.toString(employeeId++));
devrs[idx].setDeptNbr(Integer.toString((idx+1)*100));
devVector.add(devrs[idx]); // update master list
}
return devrs;
}
}
</samp></pre>
</body>
</html>

View file

@ -1,102 +1,102 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
<title>DeveloperSubSystemConfiguration Class After Editing</title>
</head>
<body>
<h1>DeveloperSubSystemConfiguration Class After Editing</h1>
<pre><samp>
package samples.subsystems;
<strong>import java.util.Vector;</strong>
<strong>import org.eclipse.rse.core.subsystems.IConnectorService;
import org.eclipse.rse.core.subsystems.ISubSystem;</strong>
import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
<strong>import org.eclipse.rse.filters.ISystemFilterPool;
import org.eclipse.rse.filters.ISystemFilterPoolManager;
import org.eclipse.rse.filters.ISystemFilter;
import org.eclipse.rse.model.IHost;</strong>
<strong>import samples.RSESamplesPlugin;</strong>
/**
* This is our subsystem factory, which creates instances of our subsystems,
* and supplies the subsystem and filter actions to their popup menus.
*/
public class DeveloperSubSystemConfiguration extends SubSystemConfiguration {
/**
* Constructor for DeveloperSubSystemConfiguration.
*/
public DeveloperSubSystemConfiguration() {
super();
}
/**
* Create an instance of our subsystem.
*/
<strong>public ISubSystem createSubSystemInternal(IHost conn) {
return new DeveloperSubSystem(conn, getConnectorService(conn));
}</strong>
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.model.IHost)
*/
public IConnectorService getConnectorService(IHost host) {
<strong>return DeveloperConnectorServiceManager.getTheDeveloperConnectorServiceManager()
.getConnectorService(host, IDeveloperSubSystem.class);</strong>
}
/**
* Intercept of parent method that creates an initial default filter pool.
* We intercept so that we can create an initial filter in that pool, which will
* list all teams.
*/
<a id="createDefaultFilterPool"/><strong>protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
{
ISystemFilterPool defaultPool = null;
try {
defaultPool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user
Vector strings = new Vector();
strings.add("*");
mgr.createSystemFilter(defaultPool, "All teams", strings);
} catch (Exception exc) {}
return defaultPool;
}</strong>
/**
* Intercept of parent method so we can supply our own value shown in the property
* sheet for the "type" property when a filter is selected within our subsystem.
*
* Requires this line in rseSamplesResources.properties: property.type.teamfilter=Team filter
*/
<strong>public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
{
return RSESamplesPlugin.getResourceString("property.type.teamfilter");
}</strong>
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsUserId()
*/
<strong>public boolean supportsUserId() {
return false;
}</strong>
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.model.IHost)
*/
<strong>public boolean supportsServerLaunchProperties(IHost host) {
return false;
}</strong>
}
</samp></pre>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
<title>DeveloperSubSystemConfiguration Class After Editing</title>
</head>
<body>
<h1>DeveloperSubSystemConfiguration Class After Editing</h1>
<pre><samp>
package samples.subsystems;
<strong>import java.util.Vector;</strong>
<strong>import org.eclipse.rse.core.subsystems.IConnectorService;
import org.eclipse.rse.core.subsystems.ISubSystem;</strong>
import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
<strong>import org.eclipse.rse.core.filters.ISystemFilterPool;
import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
import org.eclipse.rse.core.filters.ISystemFilter;
import org.eclipse.rse.core.model.IHost;</strong>
<strong>import samples.RSESamplesPlugin;</strong>
/**
* This is our subsystem factory, which creates instances of our subsystems,
* and supplies the subsystem and filter actions to their popup menus.
*/
public class DeveloperSubSystemConfiguration extends SubSystemConfiguration {
/**
* Constructor for DeveloperSubSystemConfiguration.
*/
public DeveloperSubSystemConfiguration() {
super();
}
/**
* Create an instance of our subsystem.
*/
<strong>public ISubSystem createSubSystemInternal(IHost conn) {
return new DeveloperSubSystem(conn, getConnectorService(conn));
}</strong>
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.core.model.IHost)
*/
public IConnectorService getConnectorService(IHost host) {
<strong>return DeveloperConnectorServiceManager.getTheDeveloperConnectorServiceManager()
.getConnectorService(host, IDeveloperSubSystem.class);</strong>
}
/**
* Intercept of parent method that creates an initial default filter pool.
* We intercept so that we can create an initial filter in that pool, which will
* list all teams.
*/
<a id="createDefaultFilterPool"/><strong>protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
{
ISystemFilterPool defaultPool = null;
try {
defaultPool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user
Vector strings = new Vector();
strings.add("*");
mgr.createSystemFilter(defaultPool, "All teams", strings);
} catch (Exception exc) {}
return defaultPool;
}</strong>
/**
* Intercept of parent method so we can supply our own value shown in the property
* sheet for the "type" property when a filter is selected within our subsystem.
*
* Requires this line in rseSamplesResources.properties: property.type.teamfilter=Team filter
*/
<strong>public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
{
return RSESamplesPlugin.getResourceString("property.type.teamfilter");
}</strong>
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsUserId()
*/
<strong>public boolean supportsUserId() {
return false;
}</strong>
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.core.model.IHost)
*/
<strong>public boolean supportsServerLaunchProperties(IHost host) {
return false;
}</strong>
}
</samp></pre>
</body>
</html>

View file

@ -1,112 +1,112 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
<title>DeveloperSubSystemFactory Class After Editing For Filter Support</title>
</head>
<body>
<h1>DeveloperSubSystemFactory Class After Editing For Filter Support</h1>
<pre><samp>
package samples.subsystems;
import java.util.Vector;
import org.eclipse.rse.core.subsystems.IConnectorService;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
import org.eclipse.rse.filters.ISystemFilter;
import org.eclipse.rse.filters.ISystemFilterPool;
import org.eclipse.rse.filters.ISystemFilterPoolManager;
import org.eclipse.rse.filters.ISystemFilter;
import org.eclipse.rse.model.IHost;
import samples.RSESamplesPlugin;
/**
* This is our subsystem factory, which creates instances of our subsystems,
* and supplies the subsystem and filter actions to their popup menus.
*/
public class DeveloperSubSystemConfiguration extends SubSystemConfiguration {
/**
* Constructor for DeveloperSubSystemConfiguration.
*/
public DeveloperSubSystemConfiguration() {
super();
}
/**
* Create an instance of our subsystem.
*/
public ISubSystem createSubSystemInternal(IHost conn) {
return new DeveloperSubSystem(conn, getConnectorService(conn));
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.model.IHost)
*/
public IConnectorService getConnectorService(IHost host) {
return DeveloperConnectorServiceManager.getTheDeveloperConnectorServiceManager()
.getConnectorService(host, IDeveloperSubSystem.class);
}
/**
* Intercept of parent method that creates an initial default filter pool.
* We intercept so that we can create an initial filter in that pool, which will
* list all teams.
*/
protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
{
ISystemFilterPool defaultPool = null;
try {
defaultPool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user
Vector strings = new Vector();
strings.add("*");
I<strong>SystemFilter filter = mgr.createSystemFilter(defaultPool,
RSESamplesPlugin.getResourceString("filter.default.name"),
strings);
filter.setType("team");</strong>
} catch (Exception exc) {}
return defaultPool;
}
/**
* Intercept of parent method so we can supply our own value shown in the property
* sheet for the "type" property when a filter is selected within our subsystem.
*
* Requires this line in rseSamplesResources.properties: property.type.teamfilter=Team filter
*/
public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
{
<strong>String type = selectedFilter.getType();
if (type == null)
type = "team";
if (type.equals("team"))
return RSESamplesPlugin.getResourceString("property.type.teamfilter");
else
return RSESamplesPlugin.getResourceString("property.type.devrfilter");</strong>
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsUserId()
*/
public boolean supportsUserId() {
return false;
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.model.IHost)
*/
public boolean supportsServerLaunchProperties(IHost host) {
return false;
}
}
</samp></pre>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
<title>DeveloperSubSystemFactory Class After Editing For Filter Support</title>
</head>
<body>
<h1>DeveloperSubSystemFactory Class After Editing For Filter Support</h1>
<pre><samp>
package samples.subsystems;
import java.util.Vector;
import org.eclipse.rse.core.subsystems.IConnectorService;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
import org.eclipse.rse.core.filters.ISystemFilter;
import org.eclipse.rse.core.filters.ISystemFilterPool;
import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
import org.eclipse.rse.core.filters.ISystemFilter;
import org.eclipse.rse.core.model.IHost;
import samples.RSESamplesPlugin;
/**
* This is our subsystem factory, which creates instances of our subsystems,
* and supplies the subsystem and filter actions to their popup menus.
*/
public class DeveloperSubSystemConfiguration extends SubSystemConfiguration {
/**
* Constructor for DeveloperSubSystemConfiguration.
*/
public DeveloperSubSystemConfiguration() {
super();
}
/**
* Create an instance of our subsystem.
*/
public ISubSystem createSubSystemInternal(IHost conn) {
return new DeveloperSubSystem(conn, getConnectorService(conn));
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.core.model.IHost)
*/
public IConnectorService getConnectorService(IHost host) {
return DeveloperConnectorServiceManager.getTheDeveloperConnectorServiceManager()
.getConnectorService(host, IDeveloperSubSystem.class);
}
/**
* Intercept of parent method that creates an initial default filter pool.
* We intercept so that we can create an initial filter in that pool, which will
* list all teams.
*/
protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
{
ISystemFilterPool defaultPool = null;
try {
defaultPool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user
Vector strings = new Vector();
strings.add("*");
I<strong>SystemFilter filter = mgr.createSystemFilter(defaultPool,
RSESamplesPlugin.getResourceString("filter.default.name"),
strings);
filter.setType("team");</strong>
} catch (Exception exc) {}
return defaultPool;
}
/**
* Intercept of parent method so we can supply our own value shown in the property
* sheet for the "type" property when a filter is selected within our subsystem.
*
* Requires this line in rseSamplesResources.properties: property.type.teamfilter=Team filter
*/
public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
{
<strong>String type = selectedFilter.getType();
if (type == null)
type = "team";
if (type.equals("team"))
return RSESamplesPlugin.getResourceString("property.type.teamfilter");
else
return RSESamplesPlugin.getResourceString("property.type.devrfilter");</strong>
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsUserId()
*/
public boolean supportsUserId() {
return false;
}
/* (non-Javadoc)
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.core.model.IHost)
*/
public boolean supportsServerLaunchProperties(IHost host) {
return false;
}
}
</samp></pre>
</body>
</html>

View file

@ -4,6 +4,7 @@
-sourcepath "../org.eclipse.rse.connectorservice.dstore/src
;../org.eclipse.rse.connectorservice.local/src
;../org.eclipse.rse.connectorservice.ssh/src
;../org.eclipse.rse.core/persistence
;../org.eclipse.rse.core/src
;../org.eclipse.rse.dstore.security/src
;../org.eclipse.rse.eclipse.filesystem/src
@ -31,7 +32,6 @@
;../org.eclipse.rse.subsystems.shells.local/src
;../org.eclipse.rse.subsystems.shells.ssh/src
;../org.eclipse.rse.ui/filters
;../org.eclipse.rse.ui/persistence
;../org.eclipse.rse.ui/model
;../org.eclipse.rse.ui/UI
;../org.eclipse.rse.ui/subsystems
@ -66,6 +66,8 @@ org.eclipse.rse.connectorservice.local
org.eclipse.rse.connectorservice.ssh
org.eclipse.rse.core
org.eclipse.rse.core.comm
org.eclipse.rse.core.filters
org.eclipse.rse.core.model
org.eclipse.rse.core.servicesubsystem
org.eclipse.rse.core.subsystems
org.eclipse.rse.core.subsystems.util

View file

@ -41,8 +41,9 @@
<topic label="org.eclipse.rse.logging.performance" href="reference/api/org/eclipse/rse/logging/performance/package-summary.html"/>
</topic>
<topic label="Model and Persistence">
<topic label="org.eclipse.rse.core.model" href="reference/api/org/eclipse/rse/core/model/package-summary.html"/>
<topic label="org.eclipse.rse.model" href="reference/api/org/eclipse/rse/model/package-summary.html"/>
<topic label="org.eclipse.rse.filters" href="reference/api/org/eclipse/rse/filters/package-summary.html"/>
<topic label="org.eclipse.rse.core.filters" href="reference/api/org/eclipse/rse/core/filters/package-summary.html"/>
<topic label="org.eclipse.rse.references" href="reference/api/org/eclipse/rse/references/package-summary.html"/>
<topic label="org.eclipse.rse.persistence" href="reference/api/org/eclipse/rse/persistence/package-summary.html"/>
<topic label="org.eclipse.rse.persistence.dom" href="reference/api/org/eclipse/rse/persistence/dom/package-summary.html"/>