Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-02-04 16:47:39 +0000
committerMichael Valenta2003-02-04 16:47:39 +0000
commitc0631dd343dd0810af62b081a0291d20580a4f28 (patch)
tree7e91d62e45a0e1871621b60e914d21f1e47725d6
parent35edf211e8a91a40372c420a269e3daf4ca3c337 (diff)
downloadeclipse.platform.team-c0631dd343dd0810af62b081a0291d20580a4f28.tar.gz
eclipse.platform.team-c0631dd343dd0810af62b081a0291d20580a4f28.tar.xz
eclipse.platform.team-c0631dd343dd0810af62b081a0291d20580a4f28.zip
24281: [CVS UI] remove dev.eclipse.org connection
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesView.java39
1 files changed, 25 insertions, 14 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesView.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesView.java
index 9598b0989..899d25132 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesView.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesView.java
@@ -107,19 +107,21 @@ public class RepositoriesView extends RemoteViewPart {
};
WorkbenchHelp.setHelp(newAction, IHelpContextIds.NEW_REPOSITORY_LOCATION_ACTION);
- newAnonAction = new Action(Policy.bind("RepositoriesView.newAnonCVS"), CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_NEWLOCATION)) { //$NON-NLS-1$
- public void run() {
- Properties p = new Properties();
- p.setProperty("connection", "pserver"); //$NON-NLS-1$ //$NON-NLS-2$
- p.setProperty("user", "anonymous"); //$NON-NLS-1$ //$NON-NLS-2$
- p.setProperty("host", "dev.eclipse.org"); //$NON-NLS-1$ //$NON-NLS-2$
- p.setProperty("root", "/home/eclipse"); //$NON-NLS-1$ //$NON-NLS-2$
- NewLocationWizard wizard = new NewLocationWizard(p);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.open();
- }
- };
- WorkbenchHelp.setHelp(newAnonAction, IHelpContextIds.NEW_DEV_ECLIPSE_REPOSITORY_LOCATION_ACTION);
+ if (includeAnonConnection()) {
+ newAnonAction = new Action(Policy.bind("RepositoriesView.newAnonCVS"), CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_NEWLOCATION)) { //$NON-NLS-1$
+ public void run() {
+ Properties p = new Properties();
+ p.setProperty("connection", "pserver"); //$NON-NLS-1$ //$NON-NLS-2$
+ p.setProperty("user", "anonymous"); //$NON-NLS-1$ //$NON-NLS-2$
+ p.setProperty("host", "dev.eclipse.org"); //$NON-NLS-1$ //$NON-NLS-2$
+ p.setProperty("root", "/home/eclipse"); //$NON-NLS-1$ //$NON-NLS-2$
+ NewLocationWizard wizard = new NewLocationWizard(p);
+ WizardDialog dialog = new WizardDialog(shell, wizard);
+ dialog.open();
+ }
+ };
+ WorkbenchHelp.setHelp(newAnonAction, IHelpContextIds.NEW_DEV_ECLIPSE_REPOSITORY_LOCATION_ACTION);
+ }
// Properties
propertiesAction = new PropertyDialogAction(shell, getViewer());
@@ -142,6 +144,14 @@ public class RepositoriesView extends RemoteViewPart {
}
/**
+ * Method includeEclipseConnection.
+ * @return boolean
+ */
+ private boolean includeAnonConnection() {
+ return System.getProperty("eclipse.cvs.anon") != null;
+ }
+
+ /**
* @see org.eclipse.team.internal.ccvs.ui.repo.RemoteViewPart#addWorkbenchActions(org.eclipse.jface.action.IMenuManager)
*/
protected void addWorkbenchActions(IMenuManager manager) {
@@ -155,7 +165,8 @@ public class RepositoriesView extends RemoteViewPart {
manager.add(propertiesAction);
}
sub.add(newAction);
- sub.add(newAnonAction);
+ if (newAnonAction != null)
+ sub.add(newAnonAction);
}
/*

Back to the top