From 9af20ac231fd81728dad29649e7c9f0cad5ad4de Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Thu, 31 May 2007 15:27:11 +0000 Subject: [PATCH] [190231][api] Move ISubSystemPropertiesWizardPage from UI to Core --- .../ISubSystemPropertiesWizardPage.java | 7 +- .../wizards/SubSystemServiceWizardPage.java | 2 + .../SystemSubSystemsPropertiesWizardPage.java | 5 +- .../subsystems/SubSystemConfiguration.java | 73 ------------------- 4 files changed, 8 insertions(+), 79 deletions(-) rename rse/plugins/{org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards => org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems}/ISubSystemPropertiesWizardPage.java (80%) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISubSystemPropertiesWizardPage.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemPropertiesWizardPage.java similarity index 80% rename from rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISubSystemPropertiesWizardPage.java rename to rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemPropertiesWizardPage.java index 8baf5043f0f..3585995ad37 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/ISubSystemPropertiesWizardPage.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/subsystems/ISubSystemPropertiesWizardPage.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,12 +11,11 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [190231] Moved from rse.ui.wizards to core.subsystems ********************************************************************************/ -package org.eclipse.rse.ui.wizards; +package org.eclipse.rse.core.subsystems; -import org.eclipse.rse.core.subsystems.ISubSystem; public interface ISubSystemPropertiesWizardPage { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java index b01297fb311..c7fb8884e76 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SubSystemServiceWizardPage.java @@ -16,6 +16,7 @@ * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Javier Montalvo Orus (Symbian) - [188146] Incorrect "FTP Settings" node in Property Sheet for Linux connection + * Martin Oberhuber (Wind River) - [190231] Move ISubSystemPropertiesWizardPage from UI to Core ********************************************************************************/ package org.eclipse.rse.ui.wizards; @@ -37,6 +38,7 @@ import org.eclipse.rse.core.subsystems.IServiceSubSystem; import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; +import org.eclipse.rse.core.subsystems.ISubSystemPropertiesWizardPage; import org.eclipse.rse.ui.widgets.services.ConnectorServiceElement; import org.eclipse.rse.ui.widgets.services.FactoryServiceElement; import org.eclipse.rse.ui.widgets.services.PropertySetServiceElement; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemSubSystemsPropertiesWizardPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemSubSystemsPropertiesWizardPage.java index 1d5edf5a93a..ee236f35c2a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemSubSystemsPropertiesWizardPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/wizards/SystemSubSystemsPropertiesWizardPage.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. + * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -11,7 +11,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [190231] Move ISubSystemPropertiesWizardPage from UI to Core ********************************************************************************/ package org.eclipse.rse.ui.wizards; @@ -21,6 +21,7 @@ import java.util.List; import org.eclipse.jface.wizard.IWizard; import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; +import org.eclipse.rse.core.subsystems.ISubSystemPropertiesWizardPage; import org.eclipse.rse.internal.ui.SystemResources; import org.eclipse.rse.internal.ui.view.monitor.TabFolderLayout; import org.eclipse.rse.ui.ISystemVerifyListener; 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 c48951142ed..d93d12118ae 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 @@ -69,9 +69,7 @@ import org.eclipse.rse.ui.ISystemMessages; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemBasePlugin; import org.eclipse.rse.ui.SystemPreferencesManager; -import org.eclipse.rse.ui.filters.actions.SystemNewFilterAction; import org.eclipse.rse.ui.messages.SystemMessageDialog; -import org.eclipse.rse.ui.wizards.ISubSystemPropertiesWizardPage; /** @@ -1419,77 +1417,6 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration } } - /** - * There is a reasonable amount of processing needed to configure filter wizards. To aid - * in performance and memory usage, we extract that processing into this method, and then - * use a callback contract with the filter wizard to call us back to do this processing - * only at the time the action is actually selected to be run. - *
- * The processing we do here is to specify the filter pools to prompt the user for, in the - * second page of the New Filter wizards. - *
- * This method is from the ISystemNewFilterActionConfigurator interface - */ - public void configureNewFilterAction(SystemNewFilterAction newFilterAction, Object callerData) - { - //System.out.println("Inside configureNewFilterAction! It worked!"); - newFilterAction.setFromRSE(true); - boolean showFilterPools = showFilterPools(); - - // It does not make sense, when invoked from a filterPool, to ask the user - // for the parent filter pool, or to ask the user whether the filter is connection - // specific, as they user has explicitly chosen their pool... - //if (!showFilterPools || (callerData instanceof SubSystem)) - if (!showFilterPools) - { - ISubSystem selectedSubSystem = (ISubSystem) callerData; - // When not showing filter pools, we need to distinquish between an advanced user and a new user. - // For a new user we simply want to ask them whether this filter is to be team sharable or private, - // and based on that, we will place the filter in the default filter pool for the appropriate profile. - // For an advanced user who has simply turned show filter pools back off, we want to let them choose - // explicitly which filter pool they want to place the filter in. - // To approximate the decision, we will define an advanced user as someone who already has a reference - // to a filter pool other than the default pools in the active profiles. - boolean advancedUser = false; - ISystemFilterPoolReferenceManager refMgr = selectedSubSystem.getSystemFilterPoolReferenceManager(); - ISystemFilterPool[] refdPools = refMgr.getReferencedSystemFilterPools(); - if (refdPools.length == 0) - SystemBasePlugin.logInfo("SubSystemConfigurationImpl::getSubSystemActions - getReferencedSystemFilterPools returned array of length zero."); //$NON-NLS-1$ - // so there already exists references to more than one filter pool, but it might simply be a reference - // to the default filter pool in the user's profile and another to reference to the default filter pool in - // the team profile... let's see... - else if (refdPools.length > 1) - { - for (int idx = 0; !advancedUser && (idx < refdPools.length); idx++) - { - if (!refdPools[idx].isDefault() && (refdPools[idx].getOwningParentName()==null)) - advancedUser = true; - } - } - if (advancedUser) - { - newFilterAction.setAllowFilterPoolSelection(refdPools); // show all pools referenced in this subsystem, and let them choose one - } - else - { - boolean anyAdded = false; - SystemFilterPoolWrapperInformation poolWrapperInfo = getNewFilterWizardPoolWrapperInformation(); - ISystemProfile[] activeProfiles = RSECorePlugin.getTheSystemRegistry().getActiveSystemProfiles(); - ISystemProfile activeProfile = selectedSubSystem.getHost().getSystemProfile(); - for (int idx = 0; idx < activeProfiles.length; idx++) - { - ISystemFilterPool defaultPool = getDefaultSystemFilterPool(activeProfiles[idx]); - if (defaultPool != null) - { - poolWrapperInfo.addWrapper(activeProfiles[idx].getName(), defaultPool, (activeProfiles[idx] == activeProfile)); // display name, pool to wrap, whether to preselect - anyAdded = true; - } - } - if (anyAdded) - newFilterAction.setAllowFilterPoolSelection(poolWrapperInfo); - } - } - } /** * Overridable entry for child classes to supply their own flavour of ISystemFilterPoolWrapperInformation for * the new filter wizards.