From dcf70fe0b832b51838bb154bc94a99f2c8e019b5 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Tue, 3 Apr 2007 17:18:39 +0000 Subject: [PATCH] [cleanup] Remove unnecessary implementations --- .../DaytimeSubSystemConfiguration.java | 11 --- .../RemoteFileSubSystemConfiguration.java | 81 ++----------------- .../RemoteProcessSubSystemConfiguration.java | 74 ----------------- .../RemoteCmdSubSystemConfiguration.java | 44 ++-------- .../subsystems/SubSystemConfiguration.java | 4 + .../TestSubSystemConfiguration.java | 14 ---- 6 files changed, 16 insertions(+), 212 deletions(-) diff --git a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystemConfiguration.java b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystemConfiguration.java index 1503b649141..379b81039bd 100644 --- a/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystemConfiguration.java +++ b/rse/examples/org.eclipse.rse.examples.daytime/src/org/eclipse/rse/examples/daytime/subsystems/DaytimeSubSystemConfiguration.java @@ -43,9 +43,6 @@ public class DaytimeSubSystemConfiguration extends ServiceSubSystemConfiguration super(); } - public boolean supportsServerLaunchProperties(IHost host) { - return false; - } public boolean supportsFilters() { return false; } @@ -103,12 +100,4 @@ public class DaytimeSubSystemConfiguration extends ServiceSubSystemConfiguration return IDaytimeService.class; } - /** - * By default, this type of subsystem supports deferred queries. - * Override this method if your implementation does not. - */ - public boolean supportsDeferredQueries() - { - return true; - } } diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystemConfiguration.java index 7569277ae02..af4e0c4cf91 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystemConfiguration.java +++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystemConfiguration.java @@ -56,6 +56,7 @@ public abstract class RemoteFileSubSystemConfiguration extends SubSystemConfigur { super(); } + /** * Tell us if this is a unix-style file system or a windows-style file system. The * default is windows. @@ -65,6 +66,7 @@ public abstract class RemoteFileSubSystemConfiguration extends SubSystemConfigur { this.unixStyle = isUnixStyle; } + /** * Tell us if this is a unix-style file system or a windows-style file system. The * default is windows. @@ -74,6 +76,7 @@ public abstract class RemoteFileSubSystemConfiguration extends SubSystemConfigur { return unixStyle; } + /** * Tell us if this file system is case sensitive. The default is isUnixStyle(), and so should * rarely need to be overridden. @@ -82,6 +85,7 @@ public abstract class RemoteFileSubSystemConfiguration extends SubSystemConfigur { return isUnixStyle(); } + /** * Tell us if this subsystem factory supports targets, which are destinations for * pushes and builds. Normally only true for file system factories. @@ -91,14 +95,7 @@ public abstract class RemoteFileSubSystemConfiguration extends SubSystemConfigur { return true; } - /** - * Tell us if this subsystem factory supports server launch properties, which allow the user - * to configure how the server-side code for these subsystems are started. There is a Server - * Launch Setting property page, with a pluggable composite, where users can configure these - * properties. - *
By default we return false. - */ - public abstract boolean supportsServerLaunchProperties(IHost host); + /** * Return true if subsystems of this factory support the environment variables property. * Return true to show it, return false to hide it. We return true. @@ -200,48 +197,7 @@ public abstract class RemoteFileSubSystemConfiguration extends SubSystemConfigur // -------------------------------------------- // PARENT METHODS RELATED TO WHAT WE SUPPORT... // -------------------------------------------- - /** - * We return true. - * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsSubSystemConnect() - */ - public boolean supportsSubSystemConnect() - { - return true; - } - /** - * We return true. - * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#isPortEditable() - */ - public boolean isPortEditable() - { - return true; - } - - /** - * We return false. - * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsCommands() - */ - public boolean supportsCommands() - { - return false; - } - /** - * We return false. - * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsProperties() - */ - public boolean supportsProperties() - { - return false; - } - /** - * We return true. - * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters() - */ - public boolean supportsFilters() - { - return true; - } - + /** * Return true if filters of this subsystem factory support dropping into. */ @@ -259,15 +215,6 @@ public abstract class RemoteFileSubSystemConfiguration extends SubSystemConfigur return true; } - /** - * We return supportsFilters() - * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsNestedFilters() - */ - public boolean supportsNestedFilters() - { - return supportsFilters(); - } - /** * Return true if you support user-defined actions for the remote system objects returned from expansion of * subsystems created by this subsystem factory. @@ -279,8 +226,6 @@ public abstract class RemoteFileSubSystemConfiguration extends SubSystemConfigur return true; } - - /** * Return true if you support user-defined/managed named file types *

We return true @@ -477,11 +422,6 @@ public abstract class RemoteFileSubSystemConfiguration extends SubSystemConfigur return "universal"; //$NON-NLS-1$ } - - - - - /** * Determines whether this factory is responsible for the creation of subsytems of the specified type * Subsystem factories should override this to indicate which subsystems they support. @@ -495,13 +435,4 @@ public abstract class RemoteFileSubSystemConfiguration extends SubSystemConfigur return isFor; } - /** - * By default file subsystems support deferred queries - * Override this method if not. - */ - public boolean supportsDeferredQueries() - { - return true; - } - } diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java index 29a8b2fef0b..ef47839a8c2 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java +++ b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java @@ -48,48 +48,6 @@ public abstract class RemoteProcessSubSystemConfiguration extends // PARENT METHODS RELATED TO WHAT WE SUPPORT... // -------------------------------------------- - /** - * We return true. - * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsSubSystemConnect() - */ - public boolean supportsSubSystemConnect() - { - return true; - } - /** - * We return true. - * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#isPortEditable() - */ - public boolean isPortEditable() - { - return true; - } - - /** - * We return false. - * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsCommands() - */ - public boolean supportsCommands() - { - return false; - } - /** - * We return false. - * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsProperties() - */ - public boolean supportsProperties() - { - return false; - } - /** - * We return true. - * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters() - */ - public boolean supportsFilters() - { - return true; - } - /** * We return false * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsNestedFilters() @@ -98,18 +56,6 @@ public abstract class RemoteProcessSubSystemConfiguration extends { return false; } - /** - * Return true if you support compile actions for the remote system objects returned from expansion of - * subsystems created by this subsystem factory. - *

- * By returning true, user sees a "Work with->Compile Commands..." action item in the popup menu for this - * subsystem. The action is supplied by the framework, but is populated using overridable methods in this subsystem. - *

We return true. - */ - public boolean supportsCompileActions() - { - return false; - } /** * Tell us if this subsystem factory supports server launch properties, which allow the user @@ -123,8 +69,6 @@ public abstract class RemoteProcessSubSystemConfiguration extends return true; } - - // ------------------------------------------------------ // PARENT METHODS RELATED TO FILTERS... // ... ONLY INTERESTING IF supportsFilters() return true! @@ -198,28 +142,10 @@ public abstract class RemoteProcessSubSystemConfiguration extends return pool; } - - - /** - * Return the translated string to show in the property sheet for the type property. - */ - public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter) - { - return super.getTranslatedFilterTypeProperty(selectedFilter); - } - public ISystemValidator getPortValidator() { ISystemValidator portValidator = new ValidatorServerPortInput(); return portValidator; } - /** - * By default, this type of subsystem supports deferred queries. - * Override this method if your implementation does not. - */ - public boolean supportsDeferredQueries() - { - return true; - } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystemConfiguration.java index d0aa18ef142..a8f5af1a005 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystemConfiguration.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystemConfiguration.java @@ -38,14 +38,6 @@ public abstract class RemoteCmdSubSystemConfiguration extends SubSystemConfigura // -------------------------------------------- // PARENT METHODS RELATED TO WHAT WE SUPPORT... // -------------------------------------------- - /** - * We return true. - * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsSubSystemConnect() - */ - public boolean supportsSubSystemConnect() - { - return true; - } /** * Return true if the subsystem supports more than one filter string @@ -73,15 +65,6 @@ public abstract class RemoteCmdSubSystemConfiguration extends SubSystemConfigura return true; } - /** - * We return true. - * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#isPortEditable() - */ - public boolean isPortEditable() - { - return true; - } - /** * We return true. * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsCommands() @@ -90,30 +73,25 @@ public abstract class RemoteCmdSubSystemConfiguration extends SubSystemConfigura { return true; } - /** - * We return false. - * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsProperties() - */ - public boolean supportsProperties() - { - return false; - } + /** - * We return true. + * Test if filters are supported. We return false. * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters() */ public boolean supportsFilters() { return false; } + /** - * We return false + * Test if nested filters are supported. We return false. * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsNestedFilters() */ public boolean supportsNestedFilters() { return false; } + /** * Tell us if filter strings are case sensitive. The default is false. */ @@ -121,6 +99,7 @@ public abstract class RemoteCmdSubSystemConfiguration extends SubSystemConfigura { return false; } + /** * Tell us if duplicate filter strings are supported. The default is true for command subsystem factories! */ @@ -161,9 +140,6 @@ public abstract class RemoteCmdSubSystemConfiguration extends SubSystemConfigura return pool; } - - - /** * Return the translated string to show in the property sheet for the type property. */ @@ -184,12 +160,4 @@ public abstract class RemoteCmdSubSystemConfiguration extends SubSystemConfigura return ";"; //$NON-NLS-1$ } - /** - * By default, deferred queries are not applicable to this type - * of subsystem. - */ - public boolean supportsDeferredQueries() - { - return false; - } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java index 95f5a127091..edad258c873 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/SubSystemConfiguration.java @@ -217,6 +217,8 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration /** * Return true if subsystem instances from this factory support getting and setting properties *

RETURNS FALSE BY DEFAULT. + * + * @return false to indicate that Properties are not supported by default. */ public boolean supportsProperties() { @@ -228,6 +230,8 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration * done for you automatically. Specifically, they * will be saved and restored for you automatically. * The default is to support filters. + * + * @return true to indicate that Filters are supported by default. */ public boolean supportsFilters() { return true; diff --git a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConfiguration.java b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConfiguration.java index 3c8e1fc225a..3a9b1a0184e 100644 --- a/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConfiguration.java +++ b/rse/tests/org.eclipse.rse.tests/src/org/eclipse/rse/tests/internal/testsubsystem/TestSubSystemConfiguration.java @@ -75,18 +75,4 @@ public class TestSubSystemConfiguration extends SubSystemConfiguration implement return "testSubSystemFilter"; //$NON-NLS-1$ } - /* (non-Javadoc) - * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.core.model.IHost) - */ - public boolean supportsServerLaunchProperties(IHost host) { - return false; - } - - /** - * By default, this type of subsystem supports deferred queries. - */ - public boolean supportsDeferredQueries() - { - return true; - } }