Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2002-04-04 11:02:17 -0500
committerMichael Valenta2002-04-04 11:02:17 -0500
commitd1c805869f6ff156af7a1d2b618f57cf36c6cfdc (patch)
treea8df2a98813f5454e002ef41b9aef72531e338e3
parentea89f2e6e0edb6b6001a2bda94615ffb552d4c69 (diff)
downloadeclipse.platform.team-d1c805869f6ff156af7a1d2b618f57cf36c6cfdc.tar.gz
eclipse.platform.team-d1c805869f6ff156af7a1d2b618f57cf36c6cfdc.tar.xz
eclipse.platform.team-d1c805869f6ff156af7a1d2b618f57cf36c6cfdc.zip
10902: Spaces should not be allowed at beginning or end of path segments
-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.java13
2 files changed, 14 insertions, 0 deletions
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 8b16592b6..1c7f802e8 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
@@ -217,6 +217,7 @@ ConfigurationWizardMainPage.repositoryPath=&Repository path:
ConfigurationWizardMainPage.invalidUserName=Invalid User Name
ConfigurationWizardMainPage.invalidHostName=Invalid Host Name
ConfigurationWizardMainPage.invalidPort=Invalid Port
+ConfigurationWizardMainPage.invalidPathWithSpaces=The repository path cannot have segments with leading or trailing spaces
Console.copy=Copy
Console.selectAll=Select All
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 ec151b25e..93c0130c3 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
@@ -10,7 +10,9 @@ import java.util.Arrays;
import java.util.List;
import java.util.Properties;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.resource.ImageDescriptor;
@@ -394,6 +396,17 @@ public class ConfigurationWizardMainPage extends CVSWizardPage {
setErrorMessage(null);
setPageComplete(false);
return;
+ } else {
+ IPath path = new Path(repositoryPathCombo.getText());
+ String[] segments = path.segments();
+ for (int i = 0; i < segments.length; i++) {
+ String string = segments[i];
+ if (string.charAt(0) == ' ' || string.charAt(string.length() -1) == ' ') {
+ setErrorMessage(Policy.bind("ConfigurationWizardMainPage.invalidPathWithSpaces"));
+ setPageComplete(false);
+ return;
+ }
+ }
}
setErrorMessage(null);
setPageComplete(true);

Back to the top