From dc366d4233ebc01b0d6477f286c59ae6140f504e Mon Sep 17 00:00:00 2001 From: David Dykstal Date: Tue, 12 Dec 2006 02:24:14 +0000 Subject: [PATCH] [150368] moved the implementation of the createDefaultFilterPool method from ServiceSubSystemConfiguration to SubSystemConfiguration --- .../ServiceSubSystemConfiguration.java | 30 --------------- .../subsystems/SubSystemConfiguration.java | 37 +++++++++++++++---- 2 files changed, 30 insertions(+), 37 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystemConfiguration.java index 11fd0c3a8f5..2c4addea0fb 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystemConfiguration.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/servicesubsystem/ServiceSubSystemConfiguration.java @@ -183,36 +183,6 @@ public abstract class ServiceSubSystemConfiguration extends SubSystemConfigurati { super.initializeSubSystem(subsys, yourNewConnectionWizardPages); } - /** - * Overridable lifecycle method. Typically overridden to supply a default filter.
- * When the user creates a new profile in the RSE (which is mapped to a SystemFilterPoolManager - * by our parent class), each subsystem factory that supports filters is asked if it wants to - * create a default system filter pool in that profile.
- * This is the method that is called to do that default filter pool creation in the new profile. - *

- * By default we create an empty filter pool with a generated name, and no pre-defined filters. - * If you don't want that behaviour, override this method and do one of the following:

- * - */ - protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr) - { - ISystemFilterPool pool = null; - try { - // ----------------------------------------------------- - // create a pool named filters - // ----------------------------------------------------- - pool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user - } catch (Exception exc) - { - SystemBasePlugin.logError("Error creating default filter pool in default subsystem factory",exc); //$NON-NLS-1$ - } - return pool; - } // -------------------------------- // METHODS FOR SUPPLYING ACTIONS... 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 4073b405536..5bf752e4feb 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 @@ -1754,15 +1754,38 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration // --------------------------------- /** - * OVERRIDABLE METHOD FOR CHILD CLASSES TO ENABLE THEM TO CREATE A DEFAULT POOL - * WHENEVER A NEW FILTER POOL MANAGER IS CREATED (EG, WHEN PROFILE CREATED). + * Overridable lifecycle method. Typically overridden to supply a default filter.
+ * When the user creates a new profile in the RSE (which is mapped to a SystemFilterPoolManager + * by our parent class), each subsystem factory that supports filters is asked if it wants to + * create a default system filter pool in that profile.
+ * This is the method that is called to do that default filter pool creation in the new profile. *

- * You should only pre-populate your default filter pool if this new manager - * (eg, its really a profile) is the user's private own. Call {@link #isUserPrivateProfile(ISystemFilterPoolManager)} - * to find out if it is. + * By default we create an empty filter pool with a generated name, and no pre-defined filters. + * If you don't want that behaviour, override this method and do one of the following:

+ * */ - protected abstract ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr); - + protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr) + { + ISystemFilterPool pool = null; + try { + // ----------------------------------------------------- + // create a pool named filters + // ----------------------------------------------------- + pool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user + } catch (Exception exc) + { + SystemBasePlugin.logError("Error creating default filter pool in default subsystem factory",exc); //$NON-NLS-1$ + } + return pool; + } + + + /** * Return true if the given filter pool manager maps to the private profile for this user. */