1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-09 18:15:23 +02:00

[164413] Remove the "Default System Type" combo from the RSE Preference page and associated preference constants. Keep the NLS for the combo in case we need it again for some reason.

This commit is contained in:
Kushal Munir 2007-04-04 12:49:57 +00:00
parent 4826b2efab
commit f54336f8b0
5 changed files with 4 additions and 53 deletions

View file

@ -543,11 +543,6 @@ public class PasswordPersistenceManager {
*/ */
public boolean isUserIDCaseSensitive(String systemType) public boolean isUserIDCaseSensitive(String systemType)
{ {
if (DEFAULT_SYSTEM_TYPE.equals(systemType))
{
systemType = RSEPreferencesManager.getSystemType();
}
// First find the correct provider // First find the correct provider
for (int i = 0; i < systemTypes.length; i++) for (int i = 0; i < systemTypes.length; i++)
{ {

View file

@ -40,10 +40,6 @@ public class RSEPreferencesManager {
* The default value for the list of active user profiles. Value is "Team". * The default value for the list of active user profiles. Value is "Team".
*/ */
private static final String DEFAULT_ACTIVEUSERPROFILES = "Team"; //$NON-NLS-1$ private static final String DEFAULT_ACTIVEUSERPROFILES = "Team"; //$NON-NLS-1$
/**
* The default value for the default system type. Value is "".
*/
private static final String DEFAULT_SYSTEMTYPE = ""; //$NON-NLS-1$
/** /**
* @return the Hashtable where the key is a string identifying a particular object, and * @return the Hashtable where the key is a string identifying a particular object, and
@ -207,25 +203,6 @@ public class RSEPreferencesManager {
} }
} }
/**
* @return the system type to default when no explicit system type is available.
*/
public static String getSystemType() {
Preferences store = RSECorePlugin.getDefault().getPluginPreferences();
String result = store.getString(IRSEPreferenceNames.SYSTEMTYPE);
return result;
}
/**
* Sets the system type to default when no explicit system type is available.
* @param systemType the string giving the system type name.
*/
public static void setSystemType(String systemType) {
Preferences store = RSECorePlugin.getDefault().getPluginPreferences();
store.setValue(IRSEPreferenceNames.SYSTEMTYPE, systemType);
savePreferences();
}
/** /**
* Sets if a system type is enabled. * Sets if a system type is enabled.
* @param systemType the system type to be enabled on this machine. * @param systemType the system type to be enabled on this machine.
@ -360,7 +337,6 @@ public class RSEPreferencesManager {
String userProfileName = getDefaultPrivateSystemProfileName(); String userProfileName = getDefaultPrivateSystemProfileName();
defaultProfileNames += ";" + userProfileName; //$NON-NLS-1$ defaultProfileNames += ";" + userProfileName; //$NON-NLS-1$
Preferences store = RSECorePlugin.getDefault().getPluginPreferences(); Preferences store = RSECorePlugin.getDefault().getPluginPreferences();
store.setDefault(IRSEPreferenceNames.SYSTEMTYPE, RSEPreferencesManager.DEFAULT_SYSTEMTYPE);
store.setDefault(IRSEPreferenceNames.ACTIVEUSERPROFILES, defaultProfileNames); store.setDefault(IRSEPreferenceNames.ACTIVEUSERPROFILES, defaultProfileNames);
store.setDefault(IRSEPreferenceNames.USE_DEFERRED_QUERIES, RSEPreferencesManager.DEFAULT_USE_DEFERRED_QUERIES); store.setDefault(IRSEPreferenceNames.USE_DEFERRED_QUERIES, RSEPreferencesManager.DEFAULT_USE_DEFERRED_QUERIES);
savePreferences(); savePreferences();

View file

@ -98,22 +98,6 @@ public class RemoteSystemsPreferencePage
{ {
IPreferenceStore coreStore = new PreferencesMapper(RSECorePlugin.getDefault().getPluginPreferences()); IPreferenceStore coreStore = new PreferencesMapper(RSECorePlugin.getDefault().getPluginPreferences());
List systemTypeLabels = new ArrayList();
IRSESystemType[] systemTypes = RSECorePlugin.getDefault().getRegistry().getSystemTypes();
for (int i = 0; i < systemTypes.length; i++) systemTypeLabels.add(systemTypes[i].getLabel());
// DEFAULT SYSTEM TYPE
SystemComboBoxFieldEditor systemTypeEditor = new SystemComboBoxFieldEditor(
IRSEPreferenceNames.SYSTEMTYPE,
SystemResources.RESID_PREF_SYSTEMTYPE_PREFIX_LABEL,
(String[])systemTypeLabels.toArray(new String[systemTypeLabels.size()]),
true, // readonly
getFieldEditorParent()
);
systemTypeEditor.setPreferenceStore(coreStore);
systemTypeEditor.setToolTipText(SystemResources.RESID_PREF_SYSTEMTYPE_PREFIX_TOOLTIP);
addField(systemTypeEditor);
// ENABLED STATE AND DEFAULT USERID PER SYSTEM TYPE // ENABLED STATE AND DEFAULT USERID PER SYSTEM TYPE
systemTypesEditor = new SystemTypeFieldEditor( systemTypesEditor = new SystemTypeFieldEditor(
ISystemPreferencesConstants.SYSTEMTYPE_VALUES, ISystemPreferencesConstants.SYSTEMTYPE_VALUES,

View file

@ -634,9 +634,8 @@ public class SystemConnectionForm implements Listener, SelectionListener, Runnab
labelHostName.setToolTipText(SystemResources.RESID_CONNECTION_HOSTNAME_TIP); labelHostName.setToolTipText(SystemResources.RESID_CONNECTION_HOSTNAME_TIP);
if (!updateMode && (defaultSystemType == null)) { if (!updateMode && (defaultSystemType == null)) {
defaultSystemType = RSEPreferencesManager.getSystemType(); defaultSystemType = lastSystemType;
if ((defaultSystemType == null) || (defaultSystemType.length() == 0))
defaultSystemType = lastSystemType;
if ((defaultSystemType == null) || (defaultSystemType.length() == 0)) if ((defaultSystemType == null) || (defaultSystemType.length() == 0))
defaultSystemType = textSystemType.getItem(0); defaultSystemType = textSystemType.getItem(0);
} }
@ -900,9 +899,7 @@ public class SystemConnectionForm implements Listener, SelectionListener, Runnab
// ...selectable: // ...selectable:
else { else {
if (defaultSystemType == null) { if (defaultSystemType == null) {
defaultSystemType = RSEPreferencesManager.getSystemType(); defaultSystemType = lastSystemType;
if ((defaultSystemType == null) || (defaultSystemType.length() == 0))
defaultSystemType = lastSystemType;
} }
if (defaultSystemType != null) { if (defaultSystemType != null) {
int selIdx = textSystemType.indexOf(defaultSystemType); int selIdx = textSystemType.indexOf(defaultSystemType);

View file

@ -51,7 +51,6 @@ public class SystemPreferencesManager {
private static void migrateCorePreferences() { private static void migrateCorePreferences() {
String[] keys = { String[] keys = {
IRSEPreferenceNames.ACTIVEUSERPROFILES, IRSEPreferenceNames.ACTIVEUSERPROFILES,
IRSEPreferenceNames.SYSTEMTYPE,
IRSEPreferenceNames.USE_DEFERRED_QUERIES, IRSEPreferenceNames.USE_DEFERRED_QUERIES,
IRSEPreferenceNames.USERIDPERKEY IRSEPreferenceNames.USERIDPERKEY
}; };