mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-01 13:25:45 +02:00
Update ISV Docs for Refactorings: model -> core.model, filters -> core.filters
This commit is contained in:
parent
7e823836c8
commit
dcfd8f3f40
18 changed files with 919 additions and 890 deletions
|
@ -52,14 +52,44 @@
|
||||||
</table>
|
</table>
|
||||||
<table><tbody><tr><td>
|
<table><tbody><tr><td>
|
||||||
<ul>
|
<ul>
|
||||||
<li>The <b>subsystemConfiguration</b> extension point has been renamed to
|
<li><b>Renamed</b> the <b>org.eclipse.rse.ui.subsystemConfiguration</b> extension point
|
||||||
<a href="http://dsdp.eclipse.org/help/latest/topic/org.eclipse.rse.doc.isv/reference/extension-points/org_eclipse_rse_ui_subsystemConfigurations.html">
|
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>
|
subsystemConfigurations</a>
|
||||||
in order to better match the standard naming scheme used by the Platform.</li>
|
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
|
<li><b>Renamed</b> the <b>org.eclipse.rse.ui.newConnectionWizardDelegate</b> extension point
|
||||||
<a href="http://dsdp.eclipse.org/help/latest/topic/org.eclipse.rse.doc.isv/reference/extension-points/org_eclipse_rse_ui_newConnectionWizardDelegates.html">
|
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>
|
newConnectionWizardDelegates</a>
|
||||||
in order to better match the standard naming scheme used by the Platform.</li>
|
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> --> <code>org.eclipse.rse.core.model</code></li>
|
||||||
|
<li>(UI) <code>org.eclipse.rse.filters</code> --> <code>org.eclipse.rse.core.filters</code></li>
|
||||||
|
<li>(UI) <code>org.eclipse.rse.subsystems.servicesubsystem</code> --> <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>
|
</ul>
|
||||||
</td></tr></tbody></table>
|
</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>
|
local subsystems (these do not define any new APIs anyways).</li>
|
||||||
<li>The <tt>IConnectorService</tt> interface may be slightly modified
|
<li>The <tt>IConnectorService</tt> interface may be slightly modified
|
||||||
in order to allow for better UI / Non-UI separation.</li>
|
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>
|
non-UI core plugin.</li>
|
||||||
</ul>
|
</ul>
|
||||||
If you want to start programming against RSE APIs now, best let us know
|
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.
|
The following critical or major bugs are currently known.
|
||||||
We'll strive to fix these as soon as possible.
|
We'll strive to fix these as soon as possible.
|
||||||
<ul>
|
<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=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>
|
</ul>
|
||||||
Click
|
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>
|
<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>
|
||||||
|
|
|
@ -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,
|
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
|
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.
|
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
|
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 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
|
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
|
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
|
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
|
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.
|
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
|
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
|
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>.
|
<A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolManager.html">filter pool manager</A>.
|
||||||
Subsystems contain <A href="../reference/api/org/eclipse/rse/filters/ISystemFilterPoolReference.html">references</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
|
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
|
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
|
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>
|
<h2><A name="Registry">System Registry</A></h2>
|
||||||
<p>The programmatic front door to all the artifacts in the RSE is the
|
<p>The programmatic front door to all the artifacts in the RSE is the
|
||||||
<b>System Registry</b>, which is an object implementing
|
<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
|
This is a singleton object that you
|
||||||
can access by calling the static method
|
can access by calling the static method
|
||||||
<A href="../reference/api/org/eclipse/rse/model/SystemStartHere.html#getSystemRegistry()">getSystemRegistry()</A> in the
|
<A href="../reference/api/org/eclipse/rse/model/SystemStartHere.html#getSystemRegistry()">getSystemRegistry()</A> in the
|
||||||
|
|
|
@ -16,20 +16,20 @@
|
||||||
<p>At runtime, the model takes a slightly different form:</p>
|
<p>At runtime, the model takes a slightly different form:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<A href="../reference/api/org/eclipse/rse/model/ISystemProfile.html">Profiles</A> are managed by a
|
<A href="../reference/api/org/eclipse/rse/core/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/ISystemProfileManager.html">profile manager</A>, and contain:
|
||||||
</li>
|
</li>
|
||||||
<ul>
|
<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>
|
<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>
|
</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>
|
which contain</li>
|
||||||
<ul>
|
<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>
|
<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>
|
||||||
</ul>
|
</ul>
|
||||||
<!--
|
<!--
|
||||||
|
@ -44,8 +44,8 @@ which contain</li>
|
||||||
<ul>
|
<ul>
|
||||||
<li><A href="../reference/api/org/eclipse/rse/core/subsystems/SubSystem.html">Subsystems</A>, keyed by host, which contain</li>
|
<li><A href="../reference/api/org/eclipse/rse/core/subsystems/SubSystem.html">Subsystems</A>, keyed by host, which contain</li>
|
||||||
<ul>
|
<ul>
|
||||||
<li><i><A href="../reference/api/org/eclipse/rse/filters/ISystemFilterPoolReference.html">References</A></i>
|
<li><i><A href="../reference/api/org/eclipse/rse/core/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>
|
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>
|
</ul>
|
||||||
<!--
|
<!--
|
||||||
<li><A href="../reference/api/org/eclipse/rse/ui/uda/SystemUDTypeElement.html">Named types</A></li>
|
<li><A href="../reference/api/org/eclipse/rse/ui/uda/SystemUDTypeElement.html">Named types</A></li>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<body bgcolor="#ffffff">
|
<body bgcolor="#ffffff">
|
||||||
<h1>RSE Model API</h1>
|
<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>.
|
singleton object accessible via <A href="../../reference/api/org/eclipse/rse/model/SystemStartHere.html#getSystemRegistry()">SystemStartHere.getSystemRegistry()</A>.
|
||||||
</p>
|
</p>
|
||||||
<p>The system registry will get you access to profiles, connections and subsystem factories.
|
<p>The system registry will get you access to profiles, connections and subsystem factories.
|
||||||
|
|
|
@ -42,11 +42,11 @@ point, you need to know the class or, preferably, interface that the objects imp
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
<TD>Profile</TD>
|
<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>
|
||||||
<TR>
|
<TR>
|
||||||
<TD>Host</TD>
|
<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>
|
||||||
<TR>
|
<TR>
|
||||||
<TD>Subsystem</TD>
|
<TD>Subsystem</TD>
|
||||||
|
@ -54,11 +54,11 @@ point, you need to know the class or, preferably, interface that the objects imp
|
||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
<TD>Filter pool reference</TD>
|
<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>
|
||||||
<TR>
|
<TR>
|
||||||
<TD>Filter reference</TD>
|
<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>
|
</TR>
|
||||||
</TBODY>
|
</TBODY>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
|
|
|
@ -16,15 +16,15 @@ all system types ("universally").
|
||||||
<p>
|
<p>
|
||||||
To programmatically access the files in a remote system
|
To programmatically access the files in a remote system
|
||||||
identified by a particular system connection, use the
|
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/core/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#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.
|
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>
|
||||||
<p>
|
<p>
|
||||||
Similarly, to programmatically run commands in a remote system
|
Similarly, to programmatically run commands in a remote system
|
||||||
identified by a particular system connection, use the
|
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/core/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#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,
|
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
|
either in a new command shell or an existing command shell. You can also set environment variables
|
||||||
using this subsytem object.
|
using this subsytem object.
|
||||||
|
|
|
@ -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
|
<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
|
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
|
To get the system registry, use the
|
||||||
<samp><A href="../../reference/api/org/eclipse/rse/model/SystemStartHere.html#getSystemRegistry()">method</a></samp>.
|
<samp><A href="../../reference/api/org/eclipse/rse/model/SystemStartHere.html#getSystemRegistry()">method</a></samp>.
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -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
|
<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
|
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>
|
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>
|
<p>You typically won't implement this interface directly, but rather sublcass <samp>ValidatorRemoteSelection</samp>.</p>
|
||||||
|
|
||||||
<h3>Validator Samples</h3>
|
<h3>Validator Samples</h3>
|
||||||
|
|
|
@ -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
|
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><page></samp> element:
|
of these objects for the <samp>objectClass</samp> attribute of the <samp><page></samp> element:
|
||||||
<ul>
|
<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>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>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/filters/ISystemFilterReference.html">org.eclipse.rse.filters.ISystemFilterReference</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>
|
</ul>
|
||||||
It is possible to scope your property pages to only appear for certain system types or subsystems, using
|
It is possible to scope your property pages to only appear for certain system types or subsystems, using
|
||||||
the <samp><filter></samp> element. For example:<br>
|
the <samp><filter></samp> element. For example:<br>
|
||||||
|
@ -54,7 +54,7 @@ the information needed to enable them to in Remote System Explorer.
|
||||||
<page name="Team Info"
|
<page name="Team Info"
|
||||||
class="samples.ui.propertypages.TeamFilterPropertyPage"
|
class="samples.ui.propertypages.TeamFilterPropertyPage"
|
||||||
id="samples.ui.pp.filter.team"
|
id="samples.ui.pp.filter.team"
|
||||||
objectClass="org.eclipse.rse.filters.ISystemFilterReference" >
|
objectClass="org.eclipse.rse.core.filters.ISystemFilterReference" >
|
||||||
<b><filter name="subsystemFactoryId" value="samples.subsystems.factory"/></b>
|
<b><filter name="subsystemFactoryId" value="samples.subsystems.factory"/></b>
|
||||||
</page>
|
</page>
|
||||||
</extension>
|
</extension>
|
||||||
|
@ -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
|
To use this you need to know the class type of these objects for the <samp>objectClass</samp> attribute
|
||||||
of the <objectContribution> element:
|
of the <objectContribution> element:
|
||||||
<ul>
|
<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>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>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/filters/ISystemFilterReference.html">org.eclipse.rse.filters.ISystemFilterReference</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>
|
</ul>
|
||||||
It is possible to scope your actions to only appear for certain system types or subsystems, using
|
It is possible to scope your actions to only appear for certain system types or subsystems, using
|
||||||
the <samp><filter></samp> element. For example:<br>
|
the <samp><filter></samp> element. For example:<br>
|
||||||
|
@ -79,7 +79,7 @@ the information needed to enable them to in Remote System Explorer.
|
||||||
<extension point="org.eclipse.ui.popupMenus">
|
<extension point="org.eclipse.ui.popupMenus">
|
||||||
<objectContribution
|
<objectContribution
|
||||||
id ="samples.ui.actions.TeamFilterActions"
|
id ="samples.ui.actions.TeamFilterActions"
|
||||||
objectClass="org.eclipse.rse.filters.ISystemFilterReference">
|
objectClass="org.eclipse.rse.core.filters.ISystemFilterReference">
|
||||||
<b><filter name="subsystemFactoryId" value="samples.subsystems.factory"/></b>
|
<b><filter name="subsystemFactoryId" value="samples.subsystems.factory"/></b>
|
||||||
<action id="samples.ui.actions.TeamFilterAction1"
|
<action id="samples.ui.actions.TeamFilterAction1"
|
||||||
label="Sample Team Filter Action"
|
label="Sample Team Filter Action"
|
||||||
|
@ -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.
|
You can specify multiple values if you comma-separate them.
|
||||||
</ul>
|
</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:
|
the following names are also supported:
|
||||||
<ul>
|
<ul>
|
||||||
<li><b><samp>"filterType"</samp></b>. Will test the <i>value</i> for an exact match on the selected filter's
|
<li><b><samp>"filterType"</samp></b>. Will test the <i>value</i> for an exact match on the selected filter's
|
||||||
|
|
|
@ -25,7 +25,7 @@ as it has only one element, <b><samp><configuration></samp></b>, with only
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>id</b>. Unique id for the extension, as required for all extensions. However, in this case it is used to create
|
<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.
|
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.
|
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>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.
|
<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>
|
<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>
|
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.
|
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.
|
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
|
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>.
|
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.
|
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
|
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>.
|
in the RSE-supplied <a href="../../reference/api/org/eclipse/rse/ui/filters/actions/SystemChangeFilterAction.html">change-filter action class</a>.
|
||||||
|
|
|
@ -1,100 +1,100 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
||||||
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
|
<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." >
|
<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">
|
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
|
||||||
<title>DeveloperConnectorService Class After Editing</title>
|
<title>DeveloperConnectorService Class After Editing</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>DeveloperConnectorService Class After Editing</h1>
|
<h1>DeveloperConnectorService Class After Editing</h1>
|
||||||
<pre><samp>
|
<pre><samp>
|
||||||
package samples.subsystems;
|
package samples.subsystems;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.rse.core.subsystems.AbstractConnectorService;
|
import org.eclipse.rse.core.subsystems.AbstractConnectorService;
|
||||||
import org.eclipse.rse.model.IHost;
|
import org.eclipse.rse.core.model.IHost;
|
||||||
|
|
||||||
import samples.RSESamplesPlugin;
|
import samples.RSESamplesPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Our system class that manages connecting to, and disconnecting from,
|
* Our system class that manages connecting to, and disconnecting from,
|
||||||
* our remote server-side code.
|
* our remote server-side code.
|
||||||
*/
|
*/
|
||||||
public class DeveloperConnectorService extends AbstractConnectorService {
|
public class DeveloperConnectorService extends AbstractConnectorService {
|
||||||
|
|
||||||
<strong>private boolean connected = false;</strong>
|
<strong>private boolean connected = false;</strong>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for DeveloperConnectorService.
|
* Constructor for DeveloperConnectorService.
|
||||||
* @param host
|
* @param host
|
||||||
*/
|
*/
|
||||||
public DeveloperConnectorService(IHost host)
|
public DeveloperConnectorService(IHost host)
|
||||||
{
|
{
|
||||||
super(
|
super(
|
||||||
RSESamplesPlugin.getResourceString("connectorservice.devr.name"),
|
RSESamplesPlugin.getResourceString("connectorservice.devr.name"),
|
||||||
RSESamplesPlugin.getResourceString("connectorservice.devr.desc"),
|
RSESamplesPlugin.getResourceString("connectorservice.devr.desc"),
|
||||||
host,
|
host,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.IConnectorService#isConnected()
|
* @see org.eclipse.rse.core.subsystems.IConnectorService#isConnected()
|
||||||
*/
|
*/
|
||||||
public boolean isConnected()
|
public boolean isConnected()
|
||||||
{
|
{
|
||||||
return connected;
|
return connected;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.AbstractConnectorService#internalConnect(org.eclipse.core.runtime.IProgressMonitor)
|
* @see org.eclipse.rse.core.subsystems.AbstractConnectorService#internalConnect(org.eclipse.core.runtime.IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
protected void internalConnect(IProgressMonitor monitor) throws Exception
|
protected void internalConnect(IProgressMonitor monitor) throws Exception
|
||||||
{
|
{
|
||||||
super.internalConnect(monitor);
|
super.internalConnect(monitor);
|
||||||
// pretend. Normally, we'd connect to our remote server-side code here
|
// pretend. Normally, we'd connect to our remote server-side code here
|
||||||
connected=true;
|
connected=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.AbstractConnectorService#internalDisconnect(org.eclipse.core.runtime.IProgressMonitor)
|
* @see org.eclipse.rse.core.subsystems.AbstractConnectorService#internalDisconnect(org.eclipse.core.runtime.IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
public void internalDisconnect(IProgressMonitor monitor) throws Exception
|
public void internalDisconnect(IProgressMonitor monitor) throws Exception
|
||||||
{
|
{
|
||||||
super.internalDisconnect(monitor);
|
super.internalDisconnect(monitor);
|
||||||
// pretend. Normally, we'd disconnect from our remote server-side code here
|
// pretend. Normally, we'd disconnect from our remote server-side code here
|
||||||
connected=false;
|
connected=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.IConnectorService#supportsRemoteServerLaunching()
|
* @see org.eclipse.rse.core.subsystems.IConnectorService#supportsRemoteServerLaunching()
|
||||||
*/
|
*/
|
||||||
public boolean supportsRemoteServerLaunching()
|
public boolean supportsRemoteServerLaunching()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.IConnectorService#hasRemoteServerLauncherProperties()
|
* @see org.eclipse.rse.core.subsystems.IConnectorService#hasRemoteServerLauncherProperties()
|
||||||
*/
|
*/
|
||||||
public boolean hasRemoteServerLauncherProperties()
|
public boolean hasRemoteServerLauncherProperties()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.IConnectorService#supportsServerLaunchProperties()
|
* @see org.eclipse.rse.core.subsystems.IConnectorService#supportsServerLaunchProperties()
|
||||||
*/
|
*/
|
||||||
public boolean supportsServerLaunchProperties()
|
public boolean supportsServerLaunchProperties()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</samp></pre>
|
</samp></pre>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,94 +1,94 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
||||||
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
|
<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." >
|
<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">
|
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
|
||||||
<title>DeveloperConnectorServiceManager Class After Editing</title>
|
<title>DeveloperConnectorServiceManager Class After Editing</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>DeveloperConnectorServiceManager Class After Editing</h1>
|
<h1>DeveloperConnectorServiceManager Class After Editing</h1>
|
||||||
<pre><samp>
|
<pre><samp>
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (c) 2006 IBM Corporation. All rights reserved.
|
* Copyright (c) 2006 IBM Corporation. All rights reserved.
|
||||||
* This program and the accompanying materials are made available under the terms
|
* 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
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Initial Contributors:
|
* Initial Contributors:
|
||||||
* The following IBM employees contributed to the Remote System Explorer
|
* The following IBM employees contributed to the Remote System Explorer
|
||||||
* component that contains this file: David McKnight, Kushal Munir,
|
* component that contains this file: David McKnight, Kushal Munir,
|
||||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
* Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package samples.subsystems;
|
package samples.subsystems;
|
||||||
|
|
||||||
import org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager;
|
import org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager;
|
||||||
import org.eclipse.rse.core.subsystems.IConnectorService;
|
import org.eclipse.rse.core.subsystems.IConnectorService;
|
||||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||||
import org.eclipse.rse.model.IHost;
|
import org.eclipse.rse.core.model.IHost;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class manages our DeveloperConnectorService objects, so that if we
|
* This class manages our DeveloperConnectorService objects, so that if we
|
||||||
* ever have multiple subsystem configurations, different subsystems can share
|
* ever have multiple subsystem configurations, different subsystems can share
|
||||||
* the same system object if they share the communication layer.
|
* the same system object if they share the communication layer.
|
||||||
*/
|
*/
|
||||||
public class DeveloperConnectorServiceManager extends
|
public class DeveloperConnectorServiceManager extends
|
||||||
AbstractConnectorServiceManager {
|
AbstractConnectorServiceManager {
|
||||||
|
|
||||||
<strong>private static DeveloperConnectorServiceManager inst;</strong>
|
<strong>private static DeveloperConnectorServiceManager inst;</strong>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for DeveloperConnectorServiceManager.
|
* Constructor for DeveloperConnectorServiceManager.
|
||||||
*/
|
*/
|
||||||
public DeveloperConnectorServiceManager()
|
public DeveloperConnectorServiceManager()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
<strong>/**
|
<strong>/**
|
||||||
* Return singleton instance
|
* Return singleton instance
|
||||||
*/
|
*/
|
||||||
public static DeveloperConnectorServiceManager getTheDeveloperConnectorServiceManager()
|
public static DeveloperConnectorServiceManager getTheDeveloperConnectorServiceManager()
|
||||||
{
|
{
|
||||||
if (inst == null)
|
if (inst == null)
|
||||||
inst = new DeveloperConnectorServiceManager();
|
inst = new DeveloperConnectorServiceManager();
|
||||||
return inst;
|
return inst;
|
||||||
}</strong>
|
}</strong>
|
||||||
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#createConnectorService(org.eclipse.rse.model.IHost)
|
* @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#createConnectorService(org.eclipse.rse.core.model.IHost)
|
||||||
*/
|
*/
|
||||||
public IConnectorService createConnectorService(IHost host)
|
public IConnectorService createConnectorService(IHost host)
|
||||||
{
|
{
|
||||||
<strong>return new DeveloperConnectorService(host);</strong>
|
<strong>return new DeveloperConnectorService(host);</strong>
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#sharesSystem(org.eclipse.rse.core.subsystems.ISubSystem)
|
* @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#sharesSystem(org.eclipse.rse.core.subsystems.ISubSystem)
|
||||||
*/
|
*/
|
||||||
public boolean sharesSystem(ISubSystem otherSubSystem)
|
public boolean sharesSystem(ISubSystem otherSubSystem)
|
||||||
{
|
{
|
||||||
<strong>return (otherSubSystem instanceof IDeveloperSubSystem);</strong>
|
<strong>return (otherSubSystem instanceof IDeveloperSubSystem);</strong>
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#getSubSystemCommonInterface(org.eclipse.rse.core.subsystems.ISubSystem)
|
* @see org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager#getSubSystemCommonInterface(org.eclipse.rse.core.subsystems.ISubSystem)
|
||||||
*/
|
*/
|
||||||
public Class getSubSystemCommonInterface(ISubSystem subsystem)
|
public Class getSubSystemCommonInterface(ISubSystem subsystem)
|
||||||
{
|
{
|
||||||
<strong>return IDeveloperSubSystem.class;</strong>
|
<strong>return IDeveloperSubSystem.class;</strong>
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</samp></pre>
|
</samp></pre>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -1,202 +1,202 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
||||||
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
|
<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." >
|
<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">
|
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
|
||||||
<title>DeveloperSubSystem Class After Editing</title>
|
<title>DeveloperSubSystem Class After Editing</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body bgcolor="#ffffff">
|
<body bgcolor="#ffffff">
|
||||||
<h1>DeveloperSubSystem Class After Editing</h1>
|
<h1>DeveloperSubSystem Class After Editing</h1>
|
||||||
<pre><samp>
|
<pre><samp>
|
||||||
package samples.subsystems;
|
package samples.subsystems;
|
||||||
|
|
||||||
<strong>import java.util.Vector;
|
<strong>import java.util.Vector;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.rse.core.subsystems.IConnectorService;</strong>
|
import org.eclipse.rse.core.subsystems.IConnectorService;</strong>
|
||||||
import org.eclipse.rse.core.subsystems.SubSystem;
|
import org.eclipse.rse.core.subsystems.SubSystem;
|
||||||
<strong>import org.eclipse.rse.model.IHost;
|
<strong>import org.eclipse.rse.core.model.IHost;
|
||||||
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
|
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
|
||||||
|
|
||||||
import samples.model.DeveloperResource;
|
import samples.model.DeveloperResource;
|
||||||
import samples.model.TeamResource;</strong>
|
import samples.model.TeamResource;</strong>
|
||||||
|
|
||||||
<strong>/**
|
<strong>/**
|
||||||
* This is our subsystem, which manages the remote connection and resources for
|
* This is our subsystem, which manages the remote connection and resources for
|
||||||
* a particular system connection object.
|
* a particular system connection object.
|
||||||
*/</strong>
|
*/</strong>
|
||||||
public class DeveloperSubSystem extends SubSystem
|
public class DeveloperSubSystem extends SubSystem
|
||||||
{
|
{
|
||||||
<strong>private TeamResource[] teams; // faked-out master list of teams</strong>
|
<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 Vector devVector = new Vector(); // faked-out master list of developers</strong>
|
||||||
<strong>private static int employeeId = 123456; // employee Id factory</strong>
|
<strong>private static int employeeId = 123456; // employee Id factory</strong>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param host
|
* @param host
|
||||||
* @param connectorService
|
* @param connectorService
|
||||||
*/
|
*/
|
||||||
public DeveloperSubSystem(IHost host, IConnectorService connectorService) {
|
public DeveloperSubSystem(IHost host, IConnectorService connectorService) {
|
||||||
super(host, connectorService);
|
super(host, connectorService);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.SubSystem#initializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
|
* @see org.eclipse.rse.core.subsystems.SubSystem#initializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
public void initializeSubSystem(IProgressMonitor monitor) {
|
public void initializeSubSystem(IProgressMonitor monitor) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.ISubSystem#uninitializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
|
* @see org.eclipse.rse.core.subsystems.ISubSystem#uninitializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
public void uninitializeSubSystem(IProgressMonitor monitor) {
|
public void uninitializeSubSystem(IProgressMonitor monitor) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<strong>/**
|
<strong>/**
|
||||||
* For drag and drop, and clipboard support of remote objects.
|
* For drag and drop, and clipboard support of remote objects.
|
||||||
*
|
*
|
||||||
* Return the remote object within the subsystem that corresponds to
|
* Return the remote object within the subsystem that corresponds to
|
||||||
* the specified unique ID. Because each subsystem maintains it's own
|
* the specified unique ID. Because each subsystem maintains it's own
|
||||||
* objects, it's the responsability of the subsystem to determine
|
* objects, it's the responsability of the subsystem to determine
|
||||||
* how an ID (or key) for a given object maps to the real object.
|
* how an ID (or key) for a given object maps to the real object.
|
||||||
* By default this returns null.
|
* By default this returns null.
|
||||||
*/
|
*/
|
||||||
public Object getObjectWithAbsoluteName(String key)
|
public Object getObjectWithAbsoluteName(String key)
|
||||||
{
|
{
|
||||||
// Functional opposite of getAbsoluteName(Object) in our resource adapters
|
// Functional opposite of getAbsoluteName(Object) in our resource adapters
|
||||||
if (key.startsWith("Team_")) //$NON-NLS-1$
|
if (key.startsWith("Team_")) //$NON-NLS-1$
|
||||||
{
|
{
|
||||||
String teamName = key.substring(5);
|
String teamName = key.substring(5);
|
||||||
TeamResource[] allTeams = getAllTeams();
|
TeamResource[] allTeams = getAllTeams();
|
||||||
for (int idx=0; idx < allTeams.length; idx++)
|
for (int idx=0; idx < allTeams.length; idx++)
|
||||||
if (allTeams[idx].getName().equals(teamName))
|
if (allTeams[idx].getName().equals(teamName))
|
||||||
return allTeams[idx];
|
return allTeams[idx];
|
||||||
}
|
}
|
||||||
else if (key.startsWith("Devr_")) //$NON-NLS-1$
|
else if (key.startsWith("Devr_")) //$NON-NLS-1$
|
||||||
{
|
{
|
||||||
String devrId = key.substring(5);
|
String devrId = key.substring(5);
|
||||||
DeveloperResource[] devrs = getAllDevelopers();
|
DeveloperResource[] devrs = getAllDevelopers();
|
||||||
for (int idx=0; idx < devrs.length; idx++)
|
for (int idx=0; idx < devrs.length; idx++)
|
||||||
if (devrs[idx].getId().equals(devrId))
|
if (devrs[idx].getId().equals(devrId))
|
||||||
return devrs[idx];
|
return devrs[idx];
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}</strong>
|
}</strong>
|
||||||
|
|
||||||
<strong>/**
|
<strong>/**
|
||||||
* When a filter is expanded, this is called for each filter string in the filter.
|
* 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.
|
* Using the criteria of the filter string, it must return objects representing remote resources.
|
||||||
* For us, this will be an array of TeamResource objects.
|
* For us, this will be an array of TeamResource objects.
|
||||||
*
|
*
|
||||||
* @param monitor - the progress monitor in effect while this operation performs
|
* @param monitor - the progress monitor in effect while this operation performs
|
||||||
* @param filterString - one of the filter strings from the expanded filter.
|
* @param filterString - one of the filter strings from the expanded filter.
|
||||||
*/
|
*/
|
||||||
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString)
|
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString)
|
||||||
throws java.lang.reflect.InvocationTargetException,
|
throws java.lang.reflect.InvocationTargetException,
|
||||||
java.lang.InterruptedException
|
java.lang.InterruptedException
|
||||||
{
|
{
|
||||||
// Fake it out for now and return dummy list.
|
// Fake it out for now and return dummy list.
|
||||||
// In reality, this would communicate with remote server-side code/data.
|
// In reality, this would communicate with remote server-side code/data.
|
||||||
TeamResource[] allTeams = getAllTeams();
|
TeamResource[] allTeams = getAllTeams();
|
||||||
|
|
||||||
// Now, subset master list, based on filter string...
|
// Now, subset master list, based on filter string...
|
||||||
NamePatternMatcher subsetter = new NamePatternMatcher(filterString);
|
NamePatternMatcher subsetter = new NamePatternMatcher(filterString);
|
||||||
Vector v = new Vector();
|
Vector v = new Vector();
|
||||||
for (int idx = 0; idx < allTeams.length; idx++)
|
for (int idx = 0; idx < allTeams.length; idx++)
|
||||||
{
|
{
|
||||||
if (subsetter.matches(allTeams[idx].getName()))
|
if (subsetter.matches(allTeams[idx].getName()))
|
||||||
v.addElement(allTeams[idx]);
|
v.addElement(allTeams[idx]);
|
||||||
}
|
}
|
||||||
TeamResource[] teams = new TeamResource[v.size()];
|
TeamResource[] teams = new TeamResource[v.size()];
|
||||||
for (int idx=0; idx < v.size(); idx++)
|
for (int idx=0; idx < v.size(); idx++)
|
||||||
teams[idx] = (TeamResource)v.elementAt(idx);
|
teams[idx] = (TeamResource)v.elementAt(idx);
|
||||||
return teams;
|
return teams;
|
||||||
}</strong>
|
}</strong>
|
||||||
|
|
||||||
<strong>/**
|
<strong>/**
|
||||||
* When a remote resource is expanded, this is called to return the children of the resource, if
|
* 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.
|
* 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.
|
* 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 monitor - the progress monitor in effect while this operation performs
|
||||||
* @param parent - the parent resource object being expanded
|
* @param parent - the parent resource object being expanded
|
||||||
* @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported.
|
* @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)
|
<a id="resolveFilterString"/>protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString)
|
||||||
throws java.lang.reflect.InvocationTargetException,
|
throws java.lang.reflect.InvocationTargetException,
|
||||||
java.lang.InterruptedException
|
java.lang.InterruptedException
|
||||||
{
|
{
|
||||||
// typically we ignore the filter string as it is always "*"
|
// typically we ignore the filter string as it is always "*"
|
||||||
// until support is added for "quick filters" the user can specify/select
|
// until support is added for "quick filters" the user can specify/select
|
||||||
// at the time they expand a remote resource.
|
// at the time they expand a remote resource.
|
||||||
|
|
||||||
TeamResource team = (TeamResource)parent;
|
TeamResource team = (TeamResource)parent;
|
||||||
return team.getDevelopers();
|
return team.getDevelopers();
|
||||||
}</strong>
|
}</strong>
|
||||||
|
|
||||||
<strong>// ------------------
|
<strong>// ------------------
|
||||||
// Our own methods...
|
// Our own methods...
|
||||||
// ------------------</strong>
|
// ------------------</strong>
|
||||||
|
|
||||||
<strong>/**
|
<strong>/**
|
||||||
* Get the list of all teams. Normally this would involve a trip the server, but we
|
* 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.
|
* fake it out and return a hard-coded local list.
|
||||||
*/
|
*/
|
||||||
public TeamResource[] getAllTeams()
|
public TeamResource[] getAllTeams()
|
||||||
{
|
{
|
||||||
if (teams == null)
|
if (teams == null)
|
||||||
teams = createTeams("Team ", 4);
|
teams = createTeams("Team ", 4);
|
||||||
return teams;
|
return teams;
|
||||||
}</strong>
|
}</strong>
|
||||||
|
|
||||||
<strong>/**
|
<strong>/**
|
||||||
* Get the list of all developers. Normally this would involve a trip the server, but we
|
* 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.
|
* fake it out and return a hard-coded local list.
|
||||||
*/
|
*/
|
||||||
public DeveloperResource[] getAllDevelopers()
|
public DeveloperResource[] getAllDevelopers()
|
||||||
{
|
{
|
||||||
DeveloperResource[] allDevrs = new DeveloperResource[devVector.size()];
|
DeveloperResource[] allDevrs = new DeveloperResource[devVector.size()];
|
||||||
for (int idx = 0; idx < allDevrs.length; idx++)
|
for (int idx = 0; idx < allDevrs.length; idx++)
|
||||||
allDevrs[idx] = (DeveloperResource)devVector.elementAt(idx);
|
allDevrs[idx] = (DeveloperResource)devVector.elementAt(idx);
|
||||||
return allDevrs;
|
return allDevrs;
|
||||||
}</strong>
|
}</strong>
|
||||||
|
|
||||||
<strong>/*
|
<strong>/*
|
||||||
* Create and return a dummy set of teams
|
* Create and return a dummy set of teams
|
||||||
*/
|
*/
|
||||||
private TeamResource[] createTeams(String prefix, int howMany)
|
private TeamResource[] createTeams(String prefix, int howMany)
|
||||||
{
|
{
|
||||||
TeamResource[] teams = new TeamResource[howMany];
|
TeamResource[] teams = new TeamResource[howMany];
|
||||||
for (int idx = 0; idx < teams.length; idx++)
|
for (int idx = 0; idx < teams.length; idx++)
|
||||||
{
|
{
|
||||||
teams[idx] = new TeamResource(this);
|
teams[idx] = new TeamResource(this);
|
||||||
teams[idx].setName(prefix + (idx+1));
|
teams[idx].setName(prefix + (idx+1));
|
||||||
teams[idx].setDevelopers(createDevelopers(teams[idx].getName()+" developer",idx+1));
|
teams[idx].setDevelopers(createDevelopers(teams[idx].getName()+" developer",idx+1));
|
||||||
}
|
}
|
||||||
return teams;
|
return teams;
|
||||||
}</strong>
|
}</strong>
|
||||||
|
|
||||||
<strong>/*
|
<strong>/*
|
||||||
* Create and return a dummy set of developers
|
* Create and return a dummy set of developers
|
||||||
*/
|
*/
|
||||||
private DeveloperResource[] createDevelopers(String prefix, int nbr)
|
private DeveloperResource[] createDevelopers(String prefix, int nbr)
|
||||||
{
|
{
|
||||||
DeveloperResource[] devrs = new DeveloperResource[nbr];
|
DeveloperResource[] devrs = new DeveloperResource[nbr];
|
||||||
for (int idx=0; idx < devrs.length; idx++)
|
for (int idx=0; idx < devrs.length; idx++)
|
||||||
{
|
{
|
||||||
devrs[idx] = new DeveloperResource(this);
|
devrs[idx] = new DeveloperResource(this);
|
||||||
devrs[idx].setName(prefix + (idx+1));
|
devrs[idx].setName(prefix + (idx+1));
|
||||||
devrs[idx].setId(Integer.toString(employeeId++));
|
devrs[idx].setId(Integer.toString(employeeId++));
|
||||||
devrs[idx].setDeptNbr(Integer.toString((idx+1)*100));
|
devrs[idx].setDeptNbr(Integer.toString((idx+1)*100));
|
||||||
devVector.add(devrs[idx]); // update master list
|
devVector.add(devrs[idx]); // update master list
|
||||||
}
|
}
|
||||||
return devrs;
|
return devrs;
|
||||||
}</strong>
|
}</strong>
|
||||||
|
|
||||||
}
|
}
|
||||||
</samp></pre>
|
</samp></pre>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,233 +1,233 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
||||||
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
|
<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." >
|
<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">
|
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
|
||||||
<title>DeveloperSubSystem Class After Editing Supporting Multiple Filter Types</title>
|
<title>DeveloperSubSystem Class After Editing Supporting Multiple Filter Types</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>DeveloperSubSystem Class After Editing Supporting Multiple Filter Types</h1>
|
<h1>DeveloperSubSystem Class After Editing Supporting Multiple Filter Types</h1>
|
||||||
<pre><samp>
|
<pre><samp>
|
||||||
package samples.subsystems;
|
package samples.subsystems;
|
||||||
|
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.rse.core.subsystems.IConnectorService;
|
import org.eclipse.rse.core.subsystems.IConnectorService;
|
||||||
import org.eclipse.rse.core.subsystems.SubSystem;
|
import org.eclipse.rse.core.subsystems.SubSystem;
|
||||||
import org.eclipse.rse.model.IHost;
|
import org.eclipse.rse.core.model.IHost;
|
||||||
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
|
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
|
||||||
|
|
||||||
import samples.model.DeveloperResource;
|
import samples.model.DeveloperResource;
|
||||||
import samples.model.TeamResource;
|
import samples.model.TeamResource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is our subsystem, which manages the remote connection and resources for
|
* This is our subsystem, which manages the remote connection and resources for
|
||||||
* a particular system connection object.
|
* a particular system connection object.
|
||||||
*/
|
*/
|
||||||
public class DeveloperSubSystem extends SubSystem
|
public class DeveloperSubSystem extends SubSystem
|
||||||
{
|
{
|
||||||
private TeamResource[] teams; // faked-out master list of teams
|
private TeamResource[] teams; // faked-out master list of teams
|
||||||
private Vector devVector = new Vector(); // faked-out master list of developers
|
private Vector devVector = new Vector(); // faked-out master list of developers
|
||||||
private static int employeeId = 123456; // employee Id factory
|
private static int employeeId = 123456; // employee Id factory
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param host
|
* @param host
|
||||||
* @param connectorService
|
* @param connectorService
|
||||||
*/
|
*/
|
||||||
public DeveloperSubSystem(IHost host, IConnectorService connectorService) {
|
public DeveloperSubSystem(IHost host, IConnectorService connectorService) {
|
||||||
super(host, connectorService);
|
super(host, connectorService);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.SubSystem#initializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
|
* @see org.eclipse.rse.core.subsystems.SubSystem#initializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
public void initializeSubSystem(IProgressMonitor monitor) {
|
public void initializeSubSystem(IProgressMonitor monitor) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.ISubSystem#uninitializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
|
* @see org.eclipse.rse.core.subsystems.ISubSystem#uninitializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
public void uninitializeSubSystem(IProgressMonitor monitor) {
|
public void uninitializeSubSystem(IProgressMonitor monitor) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For drag and drop, and clipboard support of remote objects.
|
* For drag and drop, and clipboard support of remote objects.
|
||||||
*
|
*
|
||||||
* Return the remote object within the subsystem that corresponds to
|
* Return the remote object within the subsystem that corresponds to
|
||||||
* the specified unique ID. Because each subsystem maintains it's own
|
* the specified unique ID. Because each subsystem maintains it's own
|
||||||
* objects, it's the responsability of the subsystem to determine
|
* objects, it's the responsability of the subsystem to determine
|
||||||
* how an ID (or key) for a given object maps to the real object.
|
* how an ID (or key) for a given object maps to the real object.
|
||||||
* By default this returns null.
|
* By default this returns null.
|
||||||
*/
|
*/
|
||||||
public Object getObjectWithAbsoluteName(String key)
|
public Object getObjectWithAbsoluteName(String key)
|
||||||
{
|
{
|
||||||
// Functional opposite of getAbsoluteName(Object) in our resource adapters
|
// Functional opposite of getAbsoluteName(Object) in our resource adapters
|
||||||
if (key.startsWith("Team_"))
|
if (key.startsWith("Team_"))
|
||||||
{
|
{
|
||||||
String teamName = key.substring(5);
|
String teamName = key.substring(5);
|
||||||
TeamResource[] allTeams = getAllTeams();
|
TeamResource[] allTeams = getAllTeams();
|
||||||
for (int idx = 0; idx < allTeams.length; idx++)
|
for (int idx = 0; idx < allTeams.length; idx++)
|
||||||
if (allTeams[idx].getName().equals(teamName))
|
if (allTeams[idx].getName().equals(teamName))
|
||||||
return allTeams[idx];
|
return allTeams[idx];
|
||||||
}
|
}
|
||||||
else if (key.startsWith("Devr_"))
|
else if (key.startsWith("Devr_"))
|
||||||
{
|
{
|
||||||
String devrId = key.substring(5);
|
String devrId = key.substring(5);
|
||||||
DeveloperResource[] devrs = getAllDevelopers();
|
DeveloperResource[] devrs = getAllDevelopers();
|
||||||
for (int idx=0; idx < devrs.length; idx++)
|
for (int idx=0; idx < devrs.length; idx++)
|
||||||
if (devrs[idx].getId().equals(devrId))
|
if (devrs[idx].getId().equals(devrId))
|
||||||
return devrs[idx];
|
return devrs[idx];
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When a filter is expanded, this is called for each filter string in the filter.
|
* 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.
|
* Using the criteria of the filter string, it must return objects representing remote resources.
|
||||||
* For us, this will be an array of TeamResource objects.
|
* For us, this will be an array of TeamResource objects.
|
||||||
*
|
*
|
||||||
* @param monitor - the progress monitor in effect while this operation performs
|
* @param monitor - the progress monitor in effect while this operation performs
|
||||||
* @param filterString - one of the filter strings from the expanded filter.
|
* @param filterString - one of the filter strings from the expanded filter.
|
||||||
*/
|
*/
|
||||||
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString)
|
protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString)
|
||||||
throws java.lang.reflect.InvocationTargetException,
|
throws java.lang.reflect.InvocationTargetException,
|
||||||
java.lang.InterruptedException
|
java.lang.InterruptedException
|
||||||
{
|
{
|
||||||
<strong>int slashIdx = filterString.indexOf('/');
|
<strong>int slashIdx = filterString.indexOf('/');
|
||||||
if (slashIdx < 0)
|
if (slashIdx < 0)
|
||||||
{</strong>
|
{</strong>
|
||||||
// Fake it out for now and return dummy list.
|
// Fake it out for now and return dummy list.
|
||||||
// In reality, this would communicate with remote server-side code/data.
|
// In reality, this would communicate with remote server-side code/data.
|
||||||
TeamResource[] allTeams = getAllTeams();
|
TeamResource[] allTeams = getAllTeams();
|
||||||
|
|
||||||
// Now, subset master list, based on filter string...
|
// Now, subset master list, based on filter string...
|
||||||
NamePatternMatcher subsetter = new NamePatternMatcher(filterString);
|
NamePatternMatcher subsetter = new NamePatternMatcher(filterString);
|
||||||
Vector v = new Vector();
|
Vector v = new Vector();
|
||||||
for (int idx=0; idx <1; allTeams.length; idx++)
|
for (int idx=0; idx <1; allTeams.length; idx++)
|
||||||
{
|
{
|
||||||
if (subsetter.matches(allTeams[idx].getName()))
|
if (subsetter.matches(allTeams[idx].getName()))
|
||||||
v.addElement(allTeams[idx]);
|
v.addElement(allTeams[idx]);
|
||||||
}
|
}
|
||||||
TeamResource[] teams = new TeamResource[v.size()];
|
TeamResource[] teams = new TeamResource[v.size()];
|
||||||
for (int idx=0; idx < v.size(); idx++)
|
for (int idx=0; idx < v.size(); idx++)
|
||||||
teams[idx] = (TeamResource)v.elementAt(idx);
|
teams[idx] = (TeamResource)v.elementAt(idx);
|
||||||
return teams;
|
return teams;
|
||||||
<strong>}
|
<strong>}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
String teamName = filterString.substring(0, slashIdx);
|
String teamName = filterString.substring(0, slashIdx);
|
||||||
String devrName = filterString.substring(slashIdx+1);
|
String devrName = filterString.substring(slashIdx+1);
|
||||||
TeamResource[] allTeams = getAllTeams();
|
TeamResource[] allTeams = getAllTeams();
|
||||||
TeamResource match = null;
|
TeamResource match = null;
|
||||||
for (int idx=0; (match==null) && (idx < allTeams.length); idx++)
|
for (int idx=0; (match==null) && (idx < allTeams.length); idx++)
|
||||||
if (allTeams[idx].getName().equals(teamName))
|
if (allTeams[idx].getName().equals(teamName))
|
||||||
match = allTeams[idx];
|
match = allTeams[idx];
|
||||||
if (match != null)
|
if (match != null)
|
||||||
{
|
{
|
||||||
DeveloperResource[] allDevrs = match.getDevelopers();
|
DeveloperResource[] allDevrs = match.getDevelopers();
|
||||||
// Now, subset master list, based on filter string...
|
// Now, subset master list, based on filter string...
|
||||||
NamePatternMatcher subsetter = new NamePatternMatcher(devrName);
|
NamePatternMatcher subsetter = new NamePatternMatcher(devrName);
|
||||||
Vector v = new Vector();
|
Vector v = new Vector();
|
||||||
for (int idx=0; idx < allDevrs.length; idx++)
|
for (int idx=0; idx < allDevrs.length; idx++)
|
||||||
{
|
{
|
||||||
if (subsetter.matches(allDevrs[idx].getName()))
|
if (subsetter.matches(allDevrs[idx].getName()))
|
||||||
v.addElement(allDevrs[idx]);
|
v.addElement(allDevrs[idx]);
|
||||||
}
|
}
|
||||||
DeveloperResource[] devrs = new DeveloperResource[v.size()];
|
DeveloperResource[] devrs = new DeveloperResource[v.size()];
|
||||||
for (int idx=0; idx < v.size(); idx++)
|
for (int idx=0; idx < v.size(); idx++)
|
||||||
devrs[idx] = (DeveloperResource)v.elementAt(idx);
|
devrs[idx] = (DeveloperResource)v.elementAt(idx);
|
||||||
return devrs;
|
return devrs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;</strong>
|
return null;</strong>
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When a remote resource is expanded, this is called to return the children of the resource, if
|
* 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>
|
* 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.
|
* 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 monitor - the progress monitor in effect while this operation performs
|
||||||
* @param parent - the parent resource object being expanded
|
* @param parent - the parent resource object being expanded
|
||||||
* @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported.
|
* @param filterString - typically defaults to "*". In future additional user-specific quick-filters may be supported.
|
||||||
*/
|
*/
|
||||||
protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString)
|
protected Object[] internalResolveFilterString(IProgressMonitor monitor, Object parent, String filterString)
|
||||||
throws java.lang.reflect.InvocationTargetException,
|
throws java.lang.reflect.InvocationTargetException,
|
||||||
java.lang.InterruptedException
|
java.lang.InterruptedException
|
||||||
{
|
{
|
||||||
// typically we ignore the filter string as it is always "*"
|
// typically we ignore the filter string as it is always "*"
|
||||||
// until support is added for "quick filters" the user can specify/select
|
// until support is added for "quick filters" the user can specify/select
|
||||||
// at the time they expand a remote resource.
|
// at the time they expand a remote resource.
|
||||||
|
|
||||||
TeamResource team = (TeamResource)parent;
|
TeamResource team = (TeamResource)parent;
|
||||||
return team.getDevelopers();
|
return team.getDevelopers();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------
|
// ------------------
|
||||||
// Our own methods...
|
// Our own methods...
|
||||||
// ------------------
|
// ------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the list of all teams. Normally this would involve a trip the server, but we
|
* 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.
|
* fake it out and return a hard-coded local list.
|
||||||
*/
|
*/
|
||||||
public TeamResource[] getAllTeams()
|
public TeamResource[] getAllTeams()
|
||||||
{
|
{
|
||||||
if (teams == null)
|
if (teams == null)
|
||||||
teams = createTeams("Team ", 4);
|
teams = createTeams("Team ", 4);
|
||||||
return teams;
|
return teams;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the list of all developers. Normally this would involve a trip the server, but we
|
* 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.
|
* fake it out and return a hard-coded local list.
|
||||||
*/
|
*/
|
||||||
public DeveloperResource[] getAllDevelopers()
|
public DeveloperResource[] getAllDevelopers()
|
||||||
{
|
{
|
||||||
DeveloperResource[] allDevrs = new DeveloperResource[devVector.size()];
|
DeveloperResource[] allDevrs = new DeveloperResource[devVector.size()];
|
||||||
for (int idx=0; idx < allDevrs.length; idx++)
|
for (int idx=0; idx < allDevrs.length; idx++)
|
||||||
allDevrs[idx] = (DeveloperResource)devVector.elementAt(idx);
|
allDevrs[idx] = (DeveloperResource)devVector.elementAt(idx);
|
||||||
return allDevrs;
|
return allDevrs;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create and return a dummy set of teams
|
* Create and return a dummy set of teams
|
||||||
*/
|
*/
|
||||||
private TeamResource[] createTeams(String prefix, int howMany)
|
private TeamResource[] createTeams(String prefix, int howMany)
|
||||||
{
|
{
|
||||||
TeamResource[] teams = new TeamResource[howMany];
|
TeamResource[] teams = new TeamResource[howMany];
|
||||||
for (int idx=0; idx < teams.length; idx++)
|
for (int idx=0; idx < teams.length; idx++)
|
||||||
{
|
{
|
||||||
teams[idx] = new TeamResource(this);
|
teams[idx] = new TeamResource(this);
|
||||||
teams[idx].setName(prefix + (idx+1));
|
teams[idx].setName(prefix + (idx+1));
|
||||||
teams[idx].setDevelopers(createDevelopers(teams[idx].getName()+" developer",idx+1));
|
teams[idx].setDevelopers(createDevelopers(teams[idx].getName()+" developer",idx+1));
|
||||||
}
|
}
|
||||||
return teams;
|
return teams;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create and return a dummy set of developers
|
* Create and return a dummy set of developers
|
||||||
*/
|
*/
|
||||||
private DeveloperResource[] createDevelopers(String prefix, int nbr)
|
private DeveloperResource[] createDevelopers(String prefix, int nbr)
|
||||||
{
|
{
|
||||||
DeveloperResource[] devrs = new DeveloperResource[nbr];
|
DeveloperResource[] devrs = new DeveloperResource[nbr];
|
||||||
for (int idx=0; idx < devrs.length; idx++)
|
for (int idx=0; idx < devrs.length; idx++)
|
||||||
{
|
{
|
||||||
devrs[idx] = new DeveloperResource(this);
|
devrs[idx] = new DeveloperResource(this);
|
||||||
devrs[idx].setName(prefix + (idx+1));
|
devrs[idx].setName(prefix + (idx+1));
|
||||||
devrs[idx].setId(Integer.toString(employeeId++));
|
devrs[idx].setId(Integer.toString(employeeId++));
|
||||||
devrs[idx].setDeptNbr(Integer.toString((idx+1)*100));
|
devrs[idx].setDeptNbr(Integer.toString((idx+1)*100));
|
||||||
devVector.add(devrs[idx]); // update master list
|
devVector.add(devrs[idx]); // update master list
|
||||||
}
|
}
|
||||||
return devrs;
|
return devrs;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</samp></pre>
|
</samp></pre>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,102 +1,102 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
||||||
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
|
<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." >
|
<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">
|
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
|
||||||
<title>DeveloperSubSystemConfiguration Class After Editing</title>
|
<title>DeveloperSubSystemConfiguration Class After Editing</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>DeveloperSubSystemConfiguration Class After Editing</h1>
|
<h1>DeveloperSubSystemConfiguration Class After Editing</h1>
|
||||||
<pre><samp>
|
<pre><samp>
|
||||||
package samples.subsystems;
|
package samples.subsystems;
|
||||||
|
|
||||||
<strong>import java.util.Vector;</strong>
|
<strong>import java.util.Vector;</strong>
|
||||||
|
|
||||||
<strong>import org.eclipse.rse.core.subsystems.IConnectorService;
|
<strong>import org.eclipse.rse.core.subsystems.IConnectorService;
|
||||||
import org.eclipse.rse.core.subsystems.ISubSystem;</strong>
|
import org.eclipse.rse.core.subsystems.ISubSystem;</strong>
|
||||||
import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
|
import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
|
||||||
<strong>import org.eclipse.rse.filters.ISystemFilterPool;
|
<strong>import org.eclipse.rse.core.filters.ISystemFilterPool;
|
||||||
import org.eclipse.rse.filters.ISystemFilterPoolManager;
|
import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
|
||||||
import org.eclipse.rse.filters.ISystemFilter;
|
import org.eclipse.rse.core.filters.ISystemFilter;
|
||||||
import org.eclipse.rse.model.IHost;</strong>
|
import org.eclipse.rse.core.model.IHost;</strong>
|
||||||
|
|
||||||
<strong>import samples.RSESamplesPlugin;</strong>
|
<strong>import samples.RSESamplesPlugin;</strong>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is our subsystem factory, which creates instances of our subsystems,
|
* This is our subsystem factory, which creates instances of our subsystems,
|
||||||
* and supplies the subsystem and filter actions to their popup menus.
|
* and supplies the subsystem and filter actions to their popup menus.
|
||||||
*/
|
*/
|
||||||
public class DeveloperSubSystemConfiguration extends SubSystemConfiguration {
|
public class DeveloperSubSystemConfiguration extends SubSystemConfiguration {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for DeveloperSubSystemConfiguration.
|
* Constructor for DeveloperSubSystemConfiguration.
|
||||||
*/
|
*/
|
||||||
public DeveloperSubSystemConfiguration() {
|
public DeveloperSubSystemConfiguration() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an instance of our subsystem.
|
* Create an instance of our subsystem.
|
||||||
*/
|
*/
|
||||||
<strong>public ISubSystem createSubSystemInternal(IHost conn) {
|
<strong>public ISubSystem createSubSystemInternal(IHost conn) {
|
||||||
return new DeveloperSubSystem(conn, getConnectorService(conn));
|
return new DeveloperSubSystem(conn, getConnectorService(conn));
|
||||||
}</strong>
|
}</strong>
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.model.IHost)
|
* @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.core.model.IHost)
|
||||||
*/
|
*/
|
||||||
public IConnectorService getConnectorService(IHost host) {
|
public IConnectorService getConnectorService(IHost host) {
|
||||||
<strong>return DeveloperConnectorServiceManager.getTheDeveloperConnectorServiceManager()
|
<strong>return DeveloperConnectorServiceManager.getTheDeveloperConnectorServiceManager()
|
||||||
.getConnectorService(host, IDeveloperSubSystem.class);</strong>
|
.getConnectorService(host, IDeveloperSubSystem.class);</strong>
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Intercept of parent method that creates an initial default filter pool.
|
* 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
|
* We intercept so that we can create an initial filter in that pool, which will
|
||||||
* list all teams.
|
* list all teams.
|
||||||
*/
|
*/
|
||||||
<a id="createDefaultFilterPool"/><strong>protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
|
<a id="createDefaultFilterPool"/><strong>protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
|
||||||
{
|
{
|
||||||
ISystemFilterPool defaultPool = null;
|
ISystemFilterPool defaultPool = null;
|
||||||
try {
|
try {
|
||||||
defaultPool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user
|
defaultPool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user
|
||||||
Vector strings = new Vector();
|
Vector strings = new Vector();
|
||||||
strings.add("*");
|
strings.add("*");
|
||||||
mgr.createSystemFilter(defaultPool, "All teams", strings);
|
mgr.createSystemFilter(defaultPool, "All teams", strings);
|
||||||
} catch (Exception exc) {}
|
} catch (Exception exc) {}
|
||||||
return defaultPool;
|
return defaultPool;
|
||||||
}</strong>
|
}</strong>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Intercept of parent method so we can supply our own value shown in the property
|
* 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.
|
* sheet for the "type" property when a filter is selected within our subsystem.
|
||||||
*
|
*
|
||||||
* Requires this line in rseSamplesResources.properties: property.type.teamfilter=Team filter
|
* Requires this line in rseSamplesResources.properties: property.type.teamfilter=Team filter
|
||||||
*/
|
*/
|
||||||
<strong>public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
|
<strong>public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
|
||||||
{
|
{
|
||||||
return RSESamplesPlugin.getResourceString("property.type.teamfilter");
|
return RSESamplesPlugin.getResourceString("property.type.teamfilter");
|
||||||
}</strong>
|
}</strong>
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsUserId()
|
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsUserId()
|
||||||
*/
|
*/
|
||||||
<strong>public boolean supportsUserId() {
|
<strong>public boolean supportsUserId() {
|
||||||
return false;
|
return false;
|
||||||
}</strong>
|
}</strong>
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.model.IHost)
|
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.core.model.IHost)
|
||||||
*/
|
*/
|
||||||
<strong>public boolean supportsServerLaunchProperties(IHost host) {
|
<strong>public boolean supportsServerLaunchProperties(IHost host) {
|
||||||
return false;
|
return false;
|
||||||
}</strong>
|
}</strong>
|
||||||
|
|
||||||
}
|
}
|
||||||
</samp></pre>
|
</samp></pre>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,112 +1,112 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
||||||
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
|
<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." >
|
<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">
|
<LINK REL="STYLESHEET" HREF="../../book.css" TYPE="text/css">
|
||||||
<title>DeveloperSubSystemFactory Class After Editing For Filter Support</title>
|
<title>DeveloperSubSystemFactory Class After Editing For Filter Support</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>DeveloperSubSystemFactory Class After Editing For Filter Support</h1>
|
<h1>DeveloperSubSystemFactory Class After Editing For Filter Support</h1>
|
||||||
<pre><samp>
|
<pre><samp>
|
||||||
package samples.subsystems;
|
package samples.subsystems;
|
||||||
|
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
import org.eclipse.rse.core.subsystems.IConnectorService;
|
import org.eclipse.rse.core.subsystems.IConnectorService;
|
||||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||||
import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
|
import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
|
||||||
import org.eclipse.rse.filters.ISystemFilter;
|
import org.eclipse.rse.core.filters.ISystemFilter;
|
||||||
import org.eclipse.rse.filters.ISystemFilterPool;
|
import org.eclipse.rse.core.filters.ISystemFilterPool;
|
||||||
import org.eclipse.rse.filters.ISystemFilterPoolManager;
|
import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
|
||||||
import org.eclipse.rse.filters.ISystemFilter;
|
import org.eclipse.rse.core.filters.ISystemFilter;
|
||||||
import org.eclipse.rse.model.IHost;
|
import org.eclipse.rse.core.model.IHost;
|
||||||
|
|
||||||
import samples.RSESamplesPlugin;
|
import samples.RSESamplesPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is our subsystem factory, which creates instances of our subsystems,
|
* This is our subsystem factory, which creates instances of our subsystems,
|
||||||
* and supplies the subsystem and filter actions to their popup menus.
|
* and supplies the subsystem and filter actions to their popup menus.
|
||||||
*/
|
*/
|
||||||
public class DeveloperSubSystemConfiguration extends SubSystemConfiguration {
|
public class DeveloperSubSystemConfiguration extends SubSystemConfiguration {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for DeveloperSubSystemConfiguration.
|
* Constructor for DeveloperSubSystemConfiguration.
|
||||||
*/
|
*/
|
||||||
public DeveloperSubSystemConfiguration() {
|
public DeveloperSubSystemConfiguration() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an instance of our subsystem.
|
* Create an instance of our subsystem.
|
||||||
*/
|
*/
|
||||||
public ISubSystem createSubSystemInternal(IHost conn) {
|
public ISubSystem createSubSystemInternal(IHost conn) {
|
||||||
return new DeveloperSubSystem(conn, getConnectorService(conn));
|
return new DeveloperSubSystem(conn, getConnectorService(conn));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.model.IHost)
|
* @see org.eclipse.rse.core.subsystems.ISubSystemConfiguration#getConnectorService(org.eclipse.rse.core.model.IHost)
|
||||||
*/
|
*/
|
||||||
public IConnectorService getConnectorService(IHost host) {
|
public IConnectorService getConnectorService(IHost host) {
|
||||||
return DeveloperConnectorServiceManager.getTheDeveloperConnectorServiceManager()
|
return DeveloperConnectorServiceManager.getTheDeveloperConnectorServiceManager()
|
||||||
.getConnectorService(host, IDeveloperSubSystem.class);
|
.getConnectorService(host, IDeveloperSubSystem.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Intercept of parent method that creates an initial default filter pool.
|
* 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
|
* We intercept so that we can create an initial filter in that pool, which will
|
||||||
* list all teams.
|
* list all teams.
|
||||||
*/
|
*/
|
||||||
protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
|
protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
|
||||||
{
|
{
|
||||||
ISystemFilterPool defaultPool = null;
|
ISystemFilterPool defaultPool = null;
|
||||||
try {
|
try {
|
||||||
defaultPool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user
|
defaultPool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user
|
||||||
Vector strings = new Vector();
|
Vector strings = new Vector();
|
||||||
strings.add("*");
|
strings.add("*");
|
||||||
I<strong>SystemFilter filter = mgr.createSystemFilter(defaultPool,
|
I<strong>SystemFilter filter = mgr.createSystemFilter(defaultPool,
|
||||||
RSESamplesPlugin.getResourceString("filter.default.name"),
|
RSESamplesPlugin.getResourceString("filter.default.name"),
|
||||||
strings);
|
strings);
|
||||||
filter.setType("team");</strong>
|
filter.setType("team");</strong>
|
||||||
} catch (Exception exc) {}
|
} catch (Exception exc) {}
|
||||||
return defaultPool;
|
return defaultPool;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Intercept of parent method so we can supply our own value shown in the property
|
* 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.
|
* sheet for the "type" property when a filter is selected within our subsystem.
|
||||||
*
|
*
|
||||||
* Requires this line in rseSamplesResources.properties: property.type.teamfilter=Team filter
|
* Requires this line in rseSamplesResources.properties: property.type.teamfilter=Team filter
|
||||||
*/
|
*/
|
||||||
public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
|
public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
|
||||||
{
|
{
|
||||||
<strong>String type = selectedFilter.getType();
|
<strong>String type = selectedFilter.getType();
|
||||||
if (type == null)
|
if (type == null)
|
||||||
type = "team";
|
type = "team";
|
||||||
if (type.equals("team"))
|
if (type.equals("team"))
|
||||||
return RSESamplesPlugin.getResourceString("property.type.teamfilter");
|
return RSESamplesPlugin.getResourceString("property.type.teamfilter");
|
||||||
else
|
else
|
||||||
return RSESamplesPlugin.getResourceString("property.type.devrfilter");</strong>
|
return RSESamplesPlugin.getResourceString("property.type.devrfilter");</strong>
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsUserId()
|
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsUserId()
|
||||||
*/
|
*/
|
||||||
public boolean supportsUserId() {
|
public boolean supportsUserId() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.model.IHost)
|
* @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.core.model.IHost)
|
||||||
*/
|
*/
|
||||||
public boolean supportsServerLaunchProperties(IHost host) {
|
public boolean supportsServerLaunchProperties(IHost host) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</samp></pre>
|
</samp></pre>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
-sourcepath "../org.eclipse.rse.connectorservice.dstore/src
|
-sourcepath "../org.eclipse.rse.connectorservice.dstore/src
|
||||||
;../org.eclipse.rse.connectorservice.local/src
|
;../org.eclipse.rse.connectorservice.local/src
|
||||||
;../org.eclipse.rse.connectorservice.ssh/src
|
;../org.eclipse.rse.connectorservice.ssh/src
|
||||||
|
;../org.eclipse.rse.core/persistence
|
||||||
;../org.eclipse.rse.core/src
|
;../org.eclipse.rse.core/src
|
||||||
;../org.eclipse.rse.dstore.security/src
|
;../org.eclipse.rse.dstore.security/src
|
||||||
;../org.eclipse.rse.eclipse.filesystem/src
|
;../org.eclipse.rse.eclipse.filesystem/src
|
||||||
|
@ -31,7 +32,6 @@
|
||||||
;../org.eclipse.rse.subsystems.shells.local/src
|
;../org.eclipse.rse.subsystems.shells.local/src
|
||||||
;../org.eclipse.rse.subsystems.shells.ssh/src
|
;../org.eclipse.rse.subsystems.shells.ssh/src
|
||||||
;../org.eclipse.rse.ui/filters
|
;../org.eclipse.rse.ui/filters
|
||||||
;../org.eclipse.rse.ui/persistence
|
|
||||||
;../org.eclipse.rse.ui/model
|
;../org.eclipse.rse.ui/model
|
||||||
;../org.eclipse.rse.ui/UI
|
;../org.eclipse.rse.ui/UI
|
||||||
;../org.eclipse.rse.ui/subsystems
|
;../org.eclipse.rse.ui/subsystems
|
||||||
|
@ -66,6 +66,8 @@ org.eclipse.rse.connectorservice.local
|
||||||
org.eclipse.rse.connectorservice.ssh
|
org.eclipse.rse.connectorservice.ssh
|
||||||
org.eclipse.rse.core
|
org.eclipse.rse.core
|
||||||
org.eclipse.rse.core.comm
|
org.eclipse.rse.core.comm
|
||||||
|
org.eclipse.rse.core.filters
|
||||||
|
org.eclipse.rse.core.model
|
||||||
org.eclipse.rse.core.servicesubsystem
|
org.eclipse.rse.core.servicesubsystem
|
||||||
org.eclipse.rse.core.subsystems
|
org.eclipse.rse.core.subsystems
|
||||||
org.eclipse.rse.core.subsystems.util
|
org.eclipse.rse.core.subsystems.util
|
||||||
|
|
|
@ -41,8 +41,9 @@
|
||||||
<topic label="org.eclipse.rse.logging.performance" href="reference/api/org/eclipse/rse/logging/performance/package-summary.html"/>
|
<topic label="org.eclipse.rse.logging.performance" href="reference/api/org/eclipse/rse/logging/performance/package-summary.html"/>
|
||||||
</topic>
|
</topic>
|
||||||
<topic label="Model and Persistence">
|
<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.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.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" 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"/>
|
<topic label="org.eclipse.rse.persistence.dom" href="reference/api/org/eclipse/rse/persistence/dom/package-summary.html"/>
|
||||||
|
|
Loading…
Add table
Reference in a new issue