Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2007-07-19 18:27:13 +0000
committerMichael Valenta2007-07-19 18:27:13 +0000
commita510689116708f99097ddc8c64855e0b8b8a12f0 (patch)
treec742bfbb539b5e2f71f77b4dc46fb3bd948acf04 /bundles
parentf03abe7d51a58a785c7ebe3c7cd894db3460f437 (diff)
downloadeclipse.platform.team-a510689116708f99097ddc8c64855e0b8b8a12f0.tar.gz
eclipse.platform.team-a510689116708f99097ddc8c64855e0b8b8a12f0.tar.xz
eclipse.platform.team-a510689116708f99097ddc8c64855e0b8b8a12f0.zip
Bug 188083 [Wizards] Default connection type while creating a new CVS Repository
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java16
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties1
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java11
3 files changed, 19 insertions, 9 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
index 74d2a70e8..222c9368e 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
@@ -419,8 +419,8 @@ public class CVSRepositoryLocation extends PlatformObject implements ICVSReposit
}
/**
- * Return the list of plugged-in connection methods.
- * @return the list of plugged-in connection methods
+ * Return the sorted array of plugged-in connection methods.
+ * @return the sorted array of plugged-in connection methods
*/
public static IConnectionMethod[] getPluggedInConnectionMethods() {
if(pluggedInConnectionMethods==null) {
@@ -445,7 +445,17 @@ public class CVSRepositoryLocation extends PlatformObject implements ICVSReposit
}
}
}
- pluggedInConnectionMethods = (IConnectionMethod[])connectionMethods.toArray(new IConnectionMethod[0]);
+ IConnectionMethod[] methods = (IConnectionMethod[]) connectionMethods.toArray(new IConnectionMethod[0]);
+ Arrays.sort(methods, new Comparator(){
+ public int compare(Object o1, Object o2) {
+ if (o1 instanceof IConnectionMethod && o2 instanceof IConnectionMethod) {
+ IConnectionMethod cm1 = (IConnectionMethod) o1;
+ IConnectionMethod cm2 = (IConnectionMethod) o2;
+ return cm1.getName().compareTo(cm2.getName());
+ }
+ return 0;
+ }});
+ pluggedInConnectionMethods = methods;
}
return pluggedInConnectionMethods;
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
index e3eeb1805..df3cc94cc 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
@@ -1091,7 +1091,6 @@ CommitWizard_11=Commit resources
CommitWizard_12=One or more of the files being committed contain errors. Do you want to proceed with the commit?
CommitWizard_13=Always allow commits with errors
CommitWizard_2=Commit Files
-CommitWizard_3=CommitWizard
CommitWizard_4=Collecting outgoing changes
CommitWizard_6=Nothing to Commit
CommitWizard_7=The selected resources do not contain any changes.
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java
index 3e5b3a194..d758d001d 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java
@@ -11,10 +11,8 @@
*******************************************************************************/
package org.eclipse.team.internal.ccvs.ui.wizards;
-import java.util.ArrayList;
-import java.util.Arrays;
+import java.util.*;
import java.util.List;
-import java.util.Properties;
import org.eclipse.core.runtime.*;
import org.eclipse.jface.dialogs.*;
@@ -427,13 +425,16 @@ public class ConfigurationWizardMainPage extends CVSWizardPage {
connectionMethodCombo.add(methods[i].getName());
}
- connectionMethodCombo.select(0);
+ // pserver is a default connection method
+ int defaultIndex = connectionMethodCombo.indexOf("pserver") != -1 ? connectionMethodCombo.indexOf("pserver") : 0; //$NON-NLS-1$ //$NON-NLS-2$
+
+ connectionMethodCombo.select(defaultIndex);
useDefaultPort.setSelection(true);
if(properties != null) {
String method = properties.getProperty("connection"); //$NON-NLS-1$
if (method == null) {
- connectionMethodCombo.select(0);
+ connectionMethodCombo.select(defaultIndex);
} else {
connectionMethodCombo.select(connectionMethodCombo.indexOf(method));
}

Back to the top