diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfileManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfileManager.java index 650ad7ab4a9..a3407c6aa52 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfileManager.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemProfileManager.java @@ -16,9 +16,6 @@ package org.eclipse.rse.core.model; -import java.util.List; -import java.util.Vector; - /** * Manages a list of SystemProfile objects. System profiles * should be created, deleted, restored, activated, and deactivated though @@ -60,11 +57,6 @@ public interface ISystemProfileManager { */ public String[] getSystemProfileNames(); - /** - * @return a vector of all existing profile names. - */ - public Vector getSystemProfileNamesVector(); - /** * Get a profile given its name. * @param name the name of the profile @@ -82,13 +74,6 @@ public interface ISystemProfileManager { */ public String[] getActiveSystemProfileNames(); - /** - * Get the index of a profile given its name. - * @param profileName the name of the profile to look for. - * @return 0-based position of the given active profile within the list of active profiles. - */ - public int getActiveSystemProfilePosition(String profileName); - /** * @return the default private profile created at first touch. * Will return null if it has been renamed. @@ -132,29 +117,10 @@ public interface ISystemProfileManager { */ public boolean isSystemProfileActive(String profileName); - /** - * @return The list of profiles known to this manager. This list is generated - * at the point of this call and may thus be manipulated by the caller. - */ - public List getProfiles(); - /** * Adds a system profile to this profile manager. * @param profile The system profile to add. */ public void addSystemProfile(ISystemProfile profile); - // /** - // * Reusable method to return a name validator for renaming a profile. - // * @param the current profile name on updates. Can be null for new profiles. Used - // * to remove from the existing name list the current connection. - // */ - // public ISystemValidator getProfileNameValidator(String profileName); - // /** - // * Reusable method to return a name validator for renaming a profile. - // * @param the current profile object on updates. Can be null for new profiles. Used - // * to remove from the existing name list the current connection. - // */ - // public ISystemValidator getProfileNameValidator(ISystemProfile profile); - } diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java index 38595b2915b..e5e5fb5c348 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/model/ISystemRegistry.java @@ -183,7 +183,7 @@ public interface ISystemRegistry extends ISchedulingRule, IAdaptable { /** * Return the profiles currently selected by the user as his "active" profiles - * @see ISystemProfileManager.getActiveSystemProfiles() + * @see ISystemProfileManager#getActiveSystemProfiles() */ public ISystemProfile[] getActiveSystemProfiles(); @@ -207,13 +207,6 @@ public interface ISystemRegistry extends ISchedulingRule, IAdaptable { */ public String[] getAllSystemProfileNames(); - /** - * Return all defined profile names as a vector - * @deprecated use getAllSystemProfileManager().getSystemProfiles() - * and process the array to get a vector - */ - public Vector getAllSystemProfileNamesVector(); - /** * Get a SystemProfile given its name */ diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemProfileManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemProfileManager.java index c72c911a89e..a451f1e345f 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemProfileManager.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemProfileManager.java @@ -18,10 +18,8 @@ package org.eclipse.rse.internal.core.model; import java.util.ArrayList; -import java.util.Arrays; import java.util.Iterator; import java.util.List; -import java.util.Vector; import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.core.RSEPreferencesManager; @@ -135,23 +133,6 @@ public class SystemProfileManager implements ISystemProfileManager { // return profileNames; } - /* (non-Javadoc) - * @see org.eclipse.rse.core.model.ISystemProfileManager#getSystemProfileNamesVector() - */ - public Vector getSystemProfileNamesVector() { - List names = Arrays.asList(getSystemProfileNames()); - Vector result = new Vector(names.size()); - result.addAll(names); - return result; -// if (profileNamesVector == null) { -// ISystemProfile[] profiles = getSystemProfiles(); -// profileNamesVector = new Vector(profiles.length); -// for (int idx = 0; idx < profiles.length; idx++) -// profileNamesVector.addElement(profiles[idx].getName()); -// } -// return profileNamesVector; - } - // /** // * Something changed so invalide cache of profiles so it will be regenerated // */ @@ -367,30 +348,6 @@ public class SystemProfileManager implements ISystemProfileManager { return activeProfileNames; } - /** - * @return the profile names currently selected by the user as "active" profiles - * @deprecated - */ - public Vector getActiveSystemProfileNamesVector() { - String[] profileNames = RSEPreferencesManager.getActiveProfiles(); - Vector v = new Vector(profileNames.length); - for (int idx = 0; idx < profileNames.length; idx++) - v.addElement(profileNames[idx]); - return v; - } - - /* (non-Javadoc) - * @see org.eclipse.rse.core.model.ISystemProfileManager#getActiveSystemProfilePosition(java.lang.String) - */ - public int getActiveSystemProfilePosition(String profileName) { - String[] profiles = getActiveSystemProfileNames(); - int pos = -1; - for (int idx = 0; (pos < 0) && (idx < profiles.length); idx++) { - if (profiles[idx].equals(profileName)) pos = idx; - } - return pos; - } - /* (non-Javadoc) * @see org.eclipse.rse.core.model.ISystemProfileManager#getDefaultPrivateSystemProfile() */ @@ -405,15 +362,6 @@ public class SystemProfileManager implements ISystemProfileManager { return getSystemProfile(RSEPreferencesManager.getDefaultTeamProfileName()); } - /* (non-Javadoc) - * @see org.eclipse.rse.core.model.ISystemProfileManager#getProfiles() - */ - public List getProfiles() { - List result = new ArrayList(_profiles.size()); - result.addAll(_profiles); - return result; - } - /* (non-Javadoc) * @see org.eclipse.rse.core.model.ISystemProfileManager#getSize() */ diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewProfileAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewProfileAdapter.java index 3c74af84a3f..3afb6be4cd5 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewProfileAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewProfileAdapter.java @@ -20,6 +20,7 @@ ********************************************************************************/ package org.eclipse.rse.internal.ui.view.team; +import java.util.Arrays; import java.util.Hashtable; import java.util.Vector; @@ -379,7 +380,9 @@ public class SystemTeamViewProfileAdapter */ public ISystemValidator getNameValidator(Object element) { - Vector names = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().getSystemProfileNamesVector(); + String[] nameArray = RSECorePlugin.getTheSystemRegistry().getSystemProfileManager().getSystemProfileNames(); + Vector names = new Vector(nameArray.length); + names.addAll(Arrays.asList(nameArray)); ISystemValidator validator = new ValidatorProfileName(names); return validator; } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ISystemValidatorUniqueString.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ISystemValidatorUniqueString.java index d6cbc438ad5..05207a4943c 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ISystemValidatorUniqueString.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ISystemValidatorUniqueString.java @@ -16,7 +16,7 @@ package org.eclipse.rse.ui.validators; -import java.util.Vector; +import java.util.List; /** * This interface is implemented by any validator that @@ -37,7 +37,7 @@ public interface ISystemValidatorUniqueString /** * Reset the existing names list. */ - public void setExistingNamesList(Vector existingList); + public void setExistingNamesList(List existingList); /** * Return the existing names list. This will be a case-normalized and sorted list. */ diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorArchiveName.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorArchiveName.java index a4ec37b0df9..9d87e6fcc20 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorArchiveName.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorArchiveName.java @@ -15,7 +15,7 @@ ********************************************************************************/ package org.eclipse.rse.ui.validators; -import java.util.Vector; +import java.util.List; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IStatus; @@ -35,7 +35,7 @@ public class ValidatorArchiveName extends ValidatorFileName { protected SystemMessage msg_NotRegisteredArchive; - public ValidatorArchiveName(Vector existingNameList) { + public ValidatorArchiveName(List existingNameList) { super(existingNameList); } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorCompileCommandLabel.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorCompileCommandLabel.java index 9c5cb2dd216..741334c9c38 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorCompileCommandLabel.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorCompileCommandLabel.java @@ -15,7 +15,7 @@ ********************************************************************************/ package org.eclipse.rse.ui.validators; -import java.util.Vector; +import java.util.List; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; @@ -37,9 +37,9 @@ public class ValidatorCompileCommandLabel extends ValidatorUniqueString protected IWorkspace workspace = ResourcesPlugin.getWorkspace(); /** - * Use this constructor when you have a vector of existing labels. + * Use this constructor when you have a list of existing labels. */ - public ValidatorCompileCommandLabel(Vector existingLabelList) + public ValidatorCompileCommandLabel(List existingLabelList) { super(existingLabelList, CASE_INSENSITIVE); // case insensitive uniqueness init(); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorConnectionName.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorConnectionName.java index 237b94badb1..7b7c02a56b5 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorConnectionName.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorConnectionName.java @@ -15,8 +15,9 @@ ********************************************************************************/ package org.eclipse.rse.ui.validators; -import java.util.Vector; +import java.util.List; +import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.ui.ISystemMessages; @@ -38,9 +39,9 @@ public class ValidatorConnectionName extends ValidatorUniqueString implements IS /** * Constructor. - * @param existingNameList Vector of existing names (strings) in owning profile. Can be null if not a rename operation. + * @param existingNameList list of existing names (strings) in owning profile. Can be null if not a rename operation. */ - public ValidatorConnectionName(Vector existingNameList) + public ValidatorConnectionName(List existingNameList) { super(existingNameList, CASE_SENSITIVE); setErrorMessages( @@ -60,11 +61,11 @@ public class ValidatorConnectionName extends ValidatorUniqueString implements IS public static boolean validateNameNotInUse(String proposedName, Shell shell) { SystemMessage msg = null; - Vector profileNames = RSEUIPlugin.getTheSystemProfileManager().getSystemProfileNamesVector(); - String profileName = null; - for (int idx=0; (msg==null)&& (idx