Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames2002-01-30 18:24:34 +0000
committerjames2002-01-30 18:24:34 +0000
commit294e187037c8daa2b57c04b5ee53d68f8c825879 (patch)
tree3b8ca661e07450314d204370c482fa530712e7ba
parentfb88c13ba5b9d6c1deec6df076fd13d7c635a629 (diff)
downloadeclipse.platform.team-294e187037c8daa2b57c04b5ee53d68f8c825879.tar.gz
eclipse.platform.team-294e187037c8daa2b57c04b5ee53d68f8c825879.tar.xz
eclipse.platform.team-294e187037c8daa2b57c04b5ee53d68f8c825879.zip
8712: "Share" with CVS wizard: repo connection list disabled if empty
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java41
1 files changed, 24 insertions, 17 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java
index c5fdd9b80..37031739b 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java
@@ -69,8 +69,11 @@ public class SharingWizard extends Wizard implements IConfigurationWizard {
autoconnectPage.setProject(project);
addPage(autoconnectPage);
} else {
- locationPage = new RepositorySelectionPage("importPage", Policy.bind("SharingWizard.importTitle"), null);
- addPage(locationPage);
+ ICVSRepositoryLocation[] locations = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownRoots();
+ if (locations.length > 0) {
+ locationPage = new RepositorySelectionPage("importPage", Policy.bind("SharingWizard.importTitle"), null);
+ addPage(locationPage);
+ }
createLocationPage = new ConfigurationWizardMainPage("createLocationPage", Policy.bind("SharingWizard.enterInformation"), null);
addPage(createLocationPage);
modulePage = new ModuleSelectionPage("modulePage", Policy.bind("SharingWizard.enterModuleName"), null);
@@ -233,19 +236,21 @@ public class SharingWizard extends Wizard implements IConfigurationWizard {
*/
private Properties getProperties() {
// If the import page has a location, use it.
- ICVSRepositoryLocation location = locationPage.getLocation();
- if (location != null) {
- Properties result = new Properties();
- result.setProperty("host", location.getHost());
- result.setProperty("connection", location.getMethod().getName());
- result.setProperty("user", location.getUsername());
- int port = location.getPort();
- if (port != ICVSRepositoryLocation.USE_DEFAULT_PORT) {
- result.setProperty("port", "" + port);
+ if (locationPage != null) {
+ ICVSRepositoryLocation location = locationPage.getLocation();
+ if (location != null) {
+ Properties result = new Properties();
+ result.setProperty("host", location.getHost());
+ result.setProperty("connection", location.getMethod().getName());
+ result.setProperty("user", location.getUsername());
+ int port = location.getPort();
+ if (port != ICVSRepositoryLocation.USE_DEFAULT_PORT) {
+ result.setProperty("port", "" + port);
+ }
+ result.setProperty("root", location.getRootDirectory());
+ result.setProperty("module", getModuleName());
+ return result;
}
- result.setProperty("root", location.getRootDirectory());
- result.setProperty("module", getModuleName());
- return result;
}
Properties properties = createLocationPage.getProperties();
properties.setProperty("module", getModuleName());
@@ -256,9 +261,11 @@ public class SharingWizard extends Wizard implements IConfigurationWizard {
*/
private ICVSRepositoryLocation getLocation() {
// If the import page has a location, use it.
- ICVSRepositoryLocation location = locationPage.getLocation();
- if (location != null) return location;
-
+ if (locationPage != null) {
+ ICVSRepositoryLocation location = locationPage.getLocation();
+ if (location != null) return location;
+ }
+
getShell().getDisplay().syncExec(new Runnable() {
public void run() {
createLocationPage.finish(new NullProgressMonitor());

Back to the top