true
to show profile page initially, false
otherwise.
- */
- public boolean getShowProfilePageInitially() {
- return !dontShowProfilePageInitially;
- }
-
+
/**
* Set whether or not to log the messages shown on the system message line for dialogs
* and wizards. These message are typically validation messages for fields.
@@ -546,7 +504,7 @@ public class RSEUIPlugin extends SystemBasePlugin implements ISystemMessageProvi
//}
// }
// new support to allow products to not pre-create a local connection
- if (SystemResourceManager.isFirstTime() && !dontShowLocalConnection) {
+ if (SystemResourceManager.isFirstTime() && SystemPreferencesManager.getShowLocalConnection()) {
ISystemProfileManager profileManager = SystemProfileManager.getSystemProfileManager();
ISystemProfile profile = profileManager.getDefaultPrivateSystemProfile();
String userName = System.getProperty("user.name"); //$NON-NLS-1$
@@ -706,22 +664,6 @@ public class RSEUIPlugin extends SystemBasePlugin implements ISystemMessageProvi
- /**
- * Returns a qualified hostname given a potentially unqualified hostname
- */
- public static String getQualifiedHostName(String hostName)
- {
- try
- {
- InetAddress address = InetAddress.getByName(hostName);
- return address.getCanonicalHostName();
- }
- catch (java.net.UnknownHostException exc)
- {
- return hostName;
- }
- }
-
/**
* Return an array of SubSystemConfigurationProxy objects.
* These represent all extensions to our subsystemConfigurations extension point.
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java
index 97d5e23a568..f73eb7751c6 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemConnectionForm.java
@@ -37,7 +37,6 @@ import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.ui.dialogs.SystemPromptDialog;
import org.eclipse.rse.ui.messages.ISystemMessageLine;
-import org.eclipse.rse.ui.propertypages.RemoteSystemsPreferencePage;
import org.eclipse.rse.ui.validators.ISystemValidator;
import org.eclipse.rse.ui.validators.ValidatorConnectionName;
import org.eclipse.rse.ui.validators.ValidatorUserId;
@@ -469,7 +468,7 @@ public class SystemConnectionForm
}
else
userIdLocation = IRSEUserIdConstants.USERID_LOCATION_NOTSET;
- SystemPreferencesManager.getPreferencesManager().setVerifyConnection(verifyHostNameCB.getSelection());
+ SystemPreferencesManager.setVerifyConnection(verifyHostNameCB.getSelection());
}
return ok;
@@ -699,7 +698,7 @@ public class SystemConnectionForm
if (!updateMode && (defaultSystemType==null))
{
- defaultSystemType = RemoteSystemsPreferencePage.getSystemTypePreference();
+ defaultSystemType = SystemPreferencesManager.getSystemType();
if ((defaultSystemType == null) || (defaultSystemType.length() == 0))
defaultSystemType = lastSystemType;
if ((defaultSystemType == null) || (defaultSystemType.length() == 0))
@@ -738,7 +737,7 @@ public class SystemConnectionForm
if (updateMode)
verifyHostNameCB.setSelection(false);
else
- verifyHostNameCB.setSelection(SystemPreferencesManager.getPreferencesManager().getVerifyConnection());
+ verifyHostNameCB.setSelection(SystemPreferencesManager.getVerifyConnection());
// yantzi: artemis 6.0, work offline
if (enableOfflineCB())
@@ -991,7 +990,7 @@ public class SystemConnectionForm
{
if (defaultSystemType == null)
{
- defaultSystemType = RemoteSystemsPreferencePage.getSystemTypePreference();
+ defaultSystemType = SystemPreferencesManager.getSystemType();
if ((defaultSystemType == null) || (defaultSystemType.length()==0))
defaultSystemType = lastSystemType;
}
@@ -1060,7 +1059,7 @@ public class SystemConnectionForm
// ---------------
// default user id
// ---------------
- String parentUserId = SystemPreferencesManager.getPreferencesManager().getDefaultUserId(systemType);
+ String parentUserId = SystemPreferencesManager.getUserId(systemType);
if (textUserId!=null)
{
textUserId.setInheritedText(parentUserId);
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceRestoreStateAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceRestoreStateAction.java
index 273b65d4937..7f2a7fb35cf 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceRestoreStateAction.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceRestoreStateAction.java
@@ -40,7 +40,7 @@ public class SystemPreferenceRestoreStateAction extends SystemBaseAction
setSelectionSensitive(false);
allowOnMultipleSelection(true);
//sr = RSEUIPlugin.getTheSystemRegistry();
- setChecked(SystemPreferencesManager.getPreferencesManager().getRememberState());
+ setChecked(SystemPreferencesManager.getRememberState());
setHelp(RSEUIPlugin.HELPPREFIX+"aprefres"); //$NON-NLS-1$
}
@@ -52,7 +52,7 @@ public class SystemPreferenceRestoreStateAction extends SystemBaseAction
public void run()
{
boolean newState = isChecked();
- SystemPreferencesManager.getPreferencesManager().setRememberState(newState);
+ SystemPreferencesManager.setRememberState(newState);
firePreferenceChangeEvent(ISystemPreferenceChangeEvents.EVENT_RESTORESTATE,
!newState,newState);
}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceShowFilterPoolsAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceShowFilterPoolsAction.java
index 8b05c418ecc..641bb195ff9 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceShowFilterPoolsAction.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemPreferenceShowFilterPoolsAction.java
@@ -40,7 +40,7 @@ public class SystemPreferenceShowFilterPoolsAction extends SystemBaseAction
super(SystemResources.ACTION_PREFERENCE_SHOW_FILTERPOOLS_LABEL,SystemResources.ACTION_PREFERENCE_SHOW_FILTERPOOLS_TOOLTIP,
parent);
allowOnMultipleSelection(true);
- setChecked(SystemPreferencesManager.getPreferencesManager().getShowFilterPools());
+ setChecked(SystemPreferencesManager.getShowFilterPools());
setSelectionSensitive(false);
setHelp(RSEUIPlugin.HELPPREFIX+"actn0011"); //$NON-NLS-1$
@@ -53,7 +53,7 @@ public class SystemPreferenceShowFilterPoolsAction extends SystemBaseAction
public void run()
{
boolean newState = isChecked();
- SystemPreferencesManager.getPreferencesManager().setShowFilterPools(newState);
+ SystemPreferencesManager.setShowFilterPools(newState);
firePreferenceChangeEvent(ISystemPreferenceChangeEvents.EVENT_SHOWFILTERPOOLS,
!newState,newState); // defect 41794
}
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPromptDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPromptDialog.java
index 80b842549d4..c428b0bead2 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPromptDialog.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemPasswordPromptDialog.java
@@ -253,7 +253,7 @@ public final class SystemPasswordPromptDialog extends SystemPromptDialog impleme
originalUserId = connectorService.getUserId();
userId = originalUserId;
if (connectorService.supportsUserId() && (userId == null || userId.length() == 0)) {
- userId = SystemPreferencesManager.getPreferencesManager().getDefaultUserId(connectorService.getHostType());
+ userId = SystemPreferencesManager.getUserId(connectorService.getHostType());
}
if (textUserId != null && userId != null) {
textUserId.setText(userId);
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/RemoteSystemsPreferencePage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/RemoteSystemsPreferencePage.java
index 4470e83688d..c99009a073b 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/RemoteSystemsPreferencePage.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/RemoteSystemsPreferencePage.java
@@ -16,22 +16,17 @@
package org.eclipse.rse.ui.propertypages;
-import java.util.Hashtable;
-import java.util.StringTokenizer;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.rse.core.IRSESystemType;
+import org.eclipse.rse.core.IRSEPreferenceNames;
import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.SystemPreferencesManager;
import org.eclipse.rse.core.model.ISystemPreferenceChangeEvents;
import org.eclipse.rse.internal.model.SystemPreferenceChangeEvent;
-import org.eclipse.rse.internal.model.SystemProfileManager;
import org.eclipse.rse.ui.ISystemPreferencesConstants;
import org.eclipse.rse.ui.Mnemonics;
-import org.eclipse.rse.ui.RSESystemTypeAdapter;
import org.eclipse.rse.ui.RSEUIPlugin;
-import org.eclipse.rse.ui.SystemConnectionForm;
import org.eclipse.rse.ui.SystemResources;
import org.eclipse.rse.ui.SystemWidgetHelpers;
import org.eclipse.swt.SWT;
@@ -93,7 +88,7 @@ public class RemoteSystemsPreferencePage
{
// DEFAULT SYSTEM TYPE
SystemComboBoxFieldEditor systemTypeEditor = new SystemComboBoxFieldEditor(
- ISystemPreferencesConstants.SYSTEMTYPE,
+ IRSEPreferenceNames.SYSTEMTYPE,
SystemResources.RESID_PREF_SYSTEMTYPE_PREFIX_LABEL,
RSECorePlugin.getDefault().getRegistry().getSystemTypeNames(),
true, // readonly
@@ -169,7 +164,7 @@ public class RemoteSystemsPreferencePage
// USE DEFERRED QUERY
useDeferredQueryEditor = new SystemBooleanFieldEditor(
- ISystemPreferencesConstants.USE_DEFERRED_QUERIES,
+ IRSEPreferenceNames.USE_DEFERRED_QUERIES,
SystemResources.RESID_PREF_USEDEFERREDQUERIES_PREFIX_LABEL,
getFieldEditorParent())
;
@@ -197,419 +192,11 @@ public class RemoteSystemsPreferencePage
}
- // ---------------------------------------------------------
- // GETTERS/SETTERS FOR EACH OF THE USER PREFERENCE VALUES...
- // ---------------------------------------------------------
- // DWD these preferences methods should be moved to SystemPreferencesManager since they are not a proper function of a preference page.
- /**
- * Return the names of the profiles the user has elected to make "active".
- */
- public static String[] getActiveProfiles()
- {
- IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
- return parseStrings(store.getString(ISystemPreferencesConstants.ACTIVEUSERPROFILES));
- }
-
- /**
- * Set the names of the profiles the user has elected to make "active".
- */
- public static void setActiveProfiles(String[] newProfileNames)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.ACTIVEUSERPROFILES, makeString(newProfileNames));
- savePreferenceStore();
- }
-
- /**
- * Return the ordered list of connection names. This is how user arranged his connections in the system view.
- */
- public static String[] getConnectionNamesOrder()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return parseStrings(store.getString(ISystemPreferencesConstants.ORDER_CONNECTIONS));
- }
- /**
- * Set the ordered list of connection names. This is how user arranged his connections in the system view.
- */
- public static void setConnectionNamesOrder(String[] newConnectionNamesOrder)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.ORDER_CONNECTIONS, makeString(newConnectionNamesOrder));
- savePreferenceStore();
- }
- /**
- * Return true if the user has elected to show filter pools in the Remote System Explorer view
- */
- public static boolean getShowFilterPoolsPreference()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return store.getBoolean(ISystemPreferencesConstants.SHOWFILTERPOOLS);
- }
- /**
- * Toggle whether to show filter pools in the Remote System Explorer view
- */
- public static void setShowFilterPoolsPreference(boolean show)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.SHOWFILTERPOOLS,show);
- savePreferenceStore();
- }
-
- /**
- * Return true if the user has elected to show the "New Connection..." prompt in the Remote Systems view
- */
- public static boolean getShowNewConnectionPromptPreference()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- boolean value = store.getBoolean(ISystemPreferencesConstants.SHOWNEWCONNECTIONPROMPT);
- return value;
- }
- /**
- * Toggle whether to show filter pools in the Remote System Explorer view
- */
- public static void setShowNewConnectionPromptPreference(boolean show)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.SHOWNEWCONNECTIONPROMPT,show);
- savePreferenceStore();
- }
-
- /**
- * Return true if the user has elected to show connection names qualified by profile
- */
- public static boolean getQualifyConnectionNamesPreference()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return store.getBoolean(ISystemPreferencesConstants.QUALIFY_CONNECTION_NAMES);
- }
- /**
- * Set if the user has elected to show connection names qualified by profile
- */
- public static void setQualifyConnectionNamesPreference(boolean set)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.QUALIFY_CONNECTION_NAMES,set);
- savePreferenceStore();
- }
-
- /**
- * Return true if the user has elected to remember the state of the Remote Systems view
- */
- public static boolean getRememberStatePreference()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return store.getBoolean(ISystemPreferencesConstants.REMEMBER_STATE);
- }
- /**
- * Set if the user has elected to show connection names qualified by profile
- */
- public static void setRememberStatePreference(boolean set)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.REMEMBER_STATE,set);
- savePreferenceStore();
- }
-
- /**
- * Return true if the user has elected to restore the state of the Remote Systems view from cached information
- */
- public static boolean getRestoreStateFromCachePreference()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return store.getBoolean(ISystemPreferencesConstants.RESTORE_STATE_FROM_CACHE);
- }
-
- /**
- * Set if the user has elected to restore the state of the Remote Systems view from cached information
- */
- public static void setRestoreStateFromCachePreference(boolean set)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.RESTORE_STATE_FROM_CACHE, set);
- savePreferenceStore();
- }
-
- /**
- * Return true if the user has elected to show user defined actions cascaded by profile
- */
- public static boolean getCascadeUserActionsPreference()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return store.getBoolean(ISystemPreferencesConstants.CASCADE_UDAS_BYPROFILE);
- }
- /**
- * Set if the user has elected to show user defined actions cascaded by profile
- */
- public static void setCascadeUserActionsPreference(boolean set)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(ISystemPreferencesConstants.CASCADE_UDAS_BYPROFILE,set);
- savePreferenceStore();
- }
- /**
- * Return the userId to default to on the Create Connection wizard, per the given system type.
- *
- * @see SystemConnectionForm
- */
- public static String getUserIdPreference(String systemType)
- {
- if (systemType == null)
- return null;
-
- IRSESystemType sysType = RSECorePlugin.getDefault().getRegistry().getSystemType(systemType);
- Object adapter = sysType.getAdapter(IRSESystemType.class);
- if (adapter instanceof RSESystemTypeAdapter)
- {
- RSESystemTypeAdapter sysTypeAdapter = (RSESystemTypeAdapter)adapter;
- return sysTypeAdapter.getDefaultUserId(sysType);
- }
- else
- return null;
- }
-
- /**
- * Set the default userId per the given system type.
- */
- public static void setUserIdPreference(String systemType, String userId)
- {
- IRSESystemType sysType = RSECorePlugin.getDefault().getRegistry().getSystemType(systemType);
- RSESystemTypeAdapter sysTypeAdapter = (RSESystemTypeAdapter)(sysType.getAdapter(IRSESystemType.class));
- if (sysTypeAdapter != null)
- sysTypeAdapter.setDefaultUserId(sysType, userId);
- else
- return;
- // following needs to stay in synch with modify() method in SystemTypeFieldEditor...
- String value = RSEUIPlugin.getDefault().getPreferenceStore().getString(ISystemPreferencesConstants.SYSTEMTYPE_VALUES);
- Hashtable keyValues = null;
- if ((value == null) || (value.length()==0)) // not initialized yet?
- {
- keyValues = new Hashtable();
- // nothing to do, as we have read from systemTypes extension points already
- }
- else
- {
- keyValues = parseString(value);
- }
-
- String defaultUserId = sysTypeAdapter.getDefaultUserId(sysType);
-
- if (defaultUserId == null) {
- defaultUserId = "null"; //$NON-NLS-1$
- }
-
- keyValues.put(sysType.getName(), "" + sysTypeAdapter.isEnabled(sysType) + SystemTypeFieldEditor.EACHVALUE_DELIMITER + defaultUserId); //$NON-NLS-1$
- String s = SystemTypeFieldEditor.createString(keyValues);
-
- if (s != null)
- RSEUIPlugin.getDefault().getPreferenceStore().setValue(ISystemPreferencesConstants.SYSTEMTYPE_VALUES, s);
-
- savePreferenceStore();
- }
-
-
-// /**
-// * Return the hashtable where the key is a string identifying a particular object, and
-// * the value is the user Id for that object.
-// */
-// public static Hashtable getUserIdsPerKey() // DWD remove this later
-// {
-// IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
-// Hashtable keyValues = null;
-// String value = store.getString(ISystemPreferencesConstants.USERIDPERKEY);
-// if (value != null)
-// keyValues = parseString(value);
-// else
-// {
-// keyValues = new Hashtable();
-// }
-// return keyValues;
-// }
-// /**
-// * Set/store the user ids that are saved keyed by some key.
-// */
-// public static void setUserIdsPerKey(Hashtable uidsPerKey) // DWD remove this later
-// {
-// IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
-// store.setValue(ISystemPreferencesConstants.USERIDPERKEY, makeString(uidsPerKey));
-// savePreferenceStore();
-// }
-
- /**
- * Return the System type to default to on the Create Connection wizard.
- *
- * @see SystemConnectionForm
- */
- public static String getSystemTypePreference()
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return store.getString(ISystemPreferencesConstants.SYSTEMTYPE);
- }
-
- /**
- * Return the history for the folder combo box widget
- */
- public static String[] getFolderHistory()
- {
- return getWidgetHistory(ISystemPreferencesConstants.HISTORY_FOLDER);
- }
- /**
- * Set the history for the folder combo box widget.
- */
- public static void setFolderHistory(String[] newHistory)
- {
- setWidgetHistory(ISystemPreferencesConstants.HISTORY_FOLDER, newHistory);
- }
- /**
- * Return the history for a widget given an arbitrary key uniquely identifying it
- */
- public static String[] getWidgetHistory(String key)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- return parseStrings(store.getString(key));
- }
- /**
- * Set the history for a widget given an arbitrary key uniquely identifying it.
- */
- public static void setWidgetHistory(String key, String[] newHistory)
- {
- IPreferenceStore store= RSEUIPlugin.getDefault().getPreferenceStore();
- store.setValue(key, makeString(newHistory));
- savePreferenceStore();
- }
-
-
- // -------------------------------------------------
- // MISCELLANEOUS METHODS...
- // -------------------------------------------------
-
- /**
- * Parse out list of key-value pairs into a hashtable
- */
- protected static Hashtable parseString(String allvalues)
- {
- StringTokenizer tokens = new StringTokenizer(allvalues, "=;"); //$NON-NLS-1$
- Hashtable keyValues = new Hashtable(10);
- int count = 0;
- String token1=null;
- String token2=null;
- while (tokens.hasMoreTokens())
- {
- count++;
- if ((count % 2) == 0) // even number
- {
- token2 = tokens.nextToken();
- keyValues.put(token1, token2);
- }
- else
- token1 = tokens.nextToken();
- }
- return keyValues;
- }
- /**
- * Convert hashtable of key-value pairs into a single string
- */
-// protected static String makeString(Hashtable keyValues) DWD remove this later
-// {
-// Enumeration keys = keyValues.keys();
-// StringBuffer sb = new StringBuffer();
-// while (keys.hasMoreElements())
-// {
-// String key = (String)keys.nextElement();
-// String value = (String)keyValues.get(key);
-// if ((value != null) && (value.length()>0))
-// {
-// sb.append(key);
-// sb.append('=');
-// sb.append(value);
-// sb.append(';');
-// }
-// }
-// return sb.toString();
-// }
-
- /**
- * Parse out list of multiple values into a string array per value
- */
- protected static String[] parseStrings(String allvalues)
- {
- if (allvalues == null)
- return new String[0];
- //StringTokenizer tokens = new StringTokenizer(allvalues, ";");
- String[] tokens = allvalues.split(";"); //$NON-NLS-1$
- return tokens;
- /*
- Vector v = new Vector();
- int idx=0;
- while (tokens.hasMoreTokens())
- v.addElement(tokens.nextToken());
- String keyValues[] = new String[v.size()];
- for (idx=0;idx* These include: *
Note: Use only junit.textui.TestRunner
here as
+ * it is explicitly supposed to output the test output to the shell the
+ * test suite has been launched from.
+ *
+ * @param args The standard Java application command line parameters passed in. + */ + public static void main(String[] args) { + junit.textui.TestRunner.run(suite()); + } + + /** + * Combine all test into a suite and returns the test suite instance. + *
+ * Note: This method must be always called suite
! Otherwise
+ * the JUnit plug-in test launcher will fail to detect this class!
+ *
+ * @return The test suite instance. + */ + public static Test suite() { + TestSuite suite = new TestSuite("RSE Preferences Test Suite"); //$NON-NLS-1$ + // add the single test suites to the overall one here. + suite.addTestSuite(PreferencesTest.class); + return suite; + } + + /* (non-Javadoc) + * @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite() + */ + public TestSuite getTestSuite() { + return (TestSuite)RSEPreferencesTestSuite.suite(); + } + +}