Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java')
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java254
1 files changed, 127 insertions, 127 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
index b84a4082e..85d9aff4b 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
@@ -115,38 +115,38 @@ public class CVSProviderPlugin extends Plugin {
private static final String CRASH_INDICATION_FILE = ".running"; //$NON-NLS-1$
private boolean crash;
- private boolean autoShareOnImport;
- private boolean useProxy;
-
- public static final String PROXY_TYPE_HTTP = "HTTP"; //$NON-NLS-1$
- public static final String PROXY_TYPE_SOCKS5 = "SOCKS5"; //$NON-NLS-1$
- public static final String HTTP_DEFAULT_PORT = "80"; //$NON-NLS-1$
- public static final String SOCKS5_DEFAULT_PORT = "1080"; //$NON-NLS-1$
-
- private String proxyType;
- private String proxyHost;
- private String proxyPort;
- private boolean useProxyAuth;
-
- private CVSActiveChangeSetCollector changeSetManager;
+ private boolean autoShareOnImport;
+ private boolean useProxy;
+
+ public static final String PROXY_TYPE_HTTP = "HTTP"; //$NON-NLS-1$
+ public static final String PROXY_TYPE_SOCKS5 = "SOCKS5"; //$NON-NLS-1$
+ public static final String HTTP_DEFAULT_PORT = "80"; //$NON-NLS-1$
+ public static final String SOCKS5_DEFAULT_PORT = "1080"; //$NON-NLS-1$
+
+ private String proxyType;
+ private String proxyHost;
+ private String proxyPort;
+ private boolean useProxyAuth;
+
+ private CVSActiveChangeSetCollector changeSetManager;
private ServiceRegistration debugRegistration;
private ServiceTracker tracker;
- private static final String INFO_PROXY_USER = "org.eclipse.team.cvs.core.proxy.user"; //$NON-NLS-1$
- private static final String INFO_PROXY_PASS = "org.eclipse.team.cvs.core.proxy.pass"; //$NON-NLS-1$
-
- private static final URL FAKE_URL;
- static {
- URL temp = null;
- try {
- temp = new URL("http://org.eclipse.team.cvs.proxy.auth");//$NON-NLS-1$
- } catch (MalformedURLException e) {
- // Should never fail
- }
- FAKE_URL = temp;
- }
-
-
+ private static final String INFO_PROXY_USER = "org.eclipse.team.cvs.core.proxy.user"; //$NON-NLS-1$
+ private static final String INFO_PROXY_PASS = "org.eclipse.team.cvs.core.proxy.pass"; //$NON-NLS-1$
+
+ private static final URL FAKE_URL;
+ static {
+ URL temp = null;
+ try {
+ temp = new URL("http://org.eclipse.team.cvs.proxy.auth");//$NON-NLS-1$
+ } catch (MalformedURLException e) {
+ // Should never fail
+ }
+ FAKE_URL = temp;
+ }
+
+
public synchronized CVSWorkspaceSubscriber getCVSWorkspaceSubscriber() {
if (cvsWorkspaceSubscriber == null) {
cvsWorkspaceSubscriber = new CVSWorkspaceSubscriber(
@@ -282,7 +282,7 @@ public class CVSProviderPlugin extends Plugin {
* @param consoleListener the listener
*/
public void setConsoleListener(IConsoleListener consoleListener) {
- ConsoleListeners.getInstance().addListener(consoleListener);
+ ConsoleListeners.getInstance().addListener(consoleListener);
}
@Override
@@ -312,8 +312,8 @@ public class CVSProviderPlugin extends Plugin {
// Must load the change set manager on startup since it listens to deltas
getChangeSetManager();
- tracker = new ServiceTracker(getBundle().getBundleContext(), IJSchService.class.getName(), null);
- tracker.open();
+ tracker = new ServiceTracker(getBundle().getBundleContext(), IJSchService.class.getName(), null);
+ tracker.open();
}
@Override
@@ -638,13 +638,13 @@ public class CVSProviderPlugin extends Plugin {
this.usePlatformLineend = usePlatformLineend;
}
- public void setAutoshareOnImport(boolean autoShareOnImport) {
- this.autoShareOnImport = autoShareOnImport;
- }
+ public void setAutoshareOnImport(boolean autoShareOnImport) {
+ this.autoShareOnImport = autoShareOnImport;
+ }
- public boolean isAutoshareOnImport() {
- return autoShareOnImport;
- }
+ public boolean isAutoshareOnImport() {
+ return autoShareOnImport;
+ }
/**
* @return Returns the watchOnEdit.
@@ -652,93 +652,93 @@ public class CVSProviderPlugin extends Plugin {
public boolean isWatchOnEdit() {
return getPluginPreferences().getBoolean(CVSProviderPlugin.ENABLE_WATCH_ON_EDIT);
}
-
- // proxy configuration
-
- public void setUseProxy(boolean useProxy) {
- this.useProxy = useProxy;
- }
-
- public boolean isUseProxy() {
- return this.useProxy;
- }
-
- public void setProxyType(String proxyType) {
- this.proxyType = proxyType;
- }
-
- public String getProxyType() {
- return this.proxyType;
- }
-
- public void setProxyHost(String proxyHost) {
- this.proxyHost = proxyHost;
- }
-
- public String getProxyHost() {
- return this.proxyHost;
- }
-
- public void setProxyPort(String proxyPort) {
- this.proxyPort = proxyPort;
- }
-
- public String getProxyPort() {
- return this.proxyPort;
- }
-
- public void setUseProxyAuth(boolean useProxyAuth) {
- this.useProxyAuth = useProxyAuth;
- }
-
- public boolean isUseProxyAuth() {
- return this.useProxyAuth;
- }
-
- public String getProxyUser() {
- Object user = getAuthInfo().get(INFO_PROXY_USER);
- return user==null ? "" : (String) user; //$NON-NLS-1$
- }
-
- public String getProxyPassword() {
- Object pass = getAuthInfo().get(INFO_PROXY_PASS);
- return pass==null ? "" : (String) pass; //$NON-NLS-1$
- }
-
- private Map getAuthInfo() {
- // Retrieve username and password from keyring.
- Map authInfo = Platform.getAuthorizationInfo(FAKE_URL, "proxy", ""); //$NON-NLS-1$ //$NON-NLS-2$
- return authInfo!=null ? authInfo : Collections.EMPTY_MAP;
- }
-
- public void setProxyAuth(String proxyUser, String proxyPass) {
- Map authInfo = getAuthInfo();
- if (authInfo.size()==0) {
- authInfo = new java.util.HashMap(4);
- }
- if (proxyUser != null) {
- authInfo.put(INFO_PROXY_USER, proxyUser);
- }
- if (proxyPass != null) {
- authInfo.put(INFO_PROXY_PASS, proxyPass);
- }
- try {
- Platform.addAuthorizationInfo(FAKE_URL, "proxy", "", authInfo); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (CoreException e) {
- // We should probably wrap the CoreException here!
- CVSProviderPlugin.log(e);
- }
- }
-
- public synchronized ActiveChangeSetManager getChangeSetManager() {
- if (changeSetManager == null) {
- changeSetManager = new CVSActiveChangeSetCollector(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber());
- }
- return changeSetManager;
- }
-
- public IJSchService getJSchService() {
- return (IJSchService)tracker.getService();
- }
-
+
+ // proxy configuration
+
+ public void setUseProxy(boolean useProxy) {
+ this.useProxy = useProxy;
+ }
+
+ public boolean isUseProxy() {
+ return this.useProxy;
+ }
+
+ public void setProxyType(String proxyType) {
+ this.proxyType = proxyType;
+ }
+
+ public String getProxyType() {
+ return this.proxyType;
+ }
+
+ public void setProxyHost(String proxyHost) {
+ this.proxyHost = proxyHost;
+ }
+
+ public String getProxyHost() {
+ return this.proxyHost;
+ }
+
+ public void setProxyPort(String proxyPort) {
+ this.proxyPort = proxyPort;
+ }
+
+ public String getProxyPort() {
+ return this.proxyPort;
+ }
+
+ public void setUseProxyAuth(boolean useProxyAuth) {
+ this.useProxyAuth = useProxyAuth;
+ }
+
+ public boolean isUseProxyAuth() {
+ return this.useProxyAuth;
+ }
+
+ public String getProxyUser() {
+ Object user = getAuthInfo().get(INFO_PROXY_USER);
+ return user==null ? "" : (String) user; //$NON-NLS-1$
+ }
+
+ public String getProxyPassword() {
+ Object pass = getAuthInfo().get(INFO_PROXY_PASS);
+ return pass==null ? "" : (String) pass; //$NON-NLS-1$
+ }
+
+ private Map getAuthInfo() {
+ // Retrieve username and password from keyring.
+ Map authInfo = Platform.getAuthorizationInfo(FAKE_URL, "proxy", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ return authInfo!=null ? authInfo : Collections.EMPTY_MAP;
+ }
+
+ public void setProxyAuth(String proxyUser, String proxyPass) {
+ Map authInfo = getAuthInfo();
+ if (authInfo.size()==0) {
+ authInfo = new java.util.HashMap(4);
+ }
+ if (proxyUser != null) {
+ authInfo.put(INFO_PROXY_USER, proxyUser);
+ }
+ if (proxyPass != null) {
+ authInfo.put(INFO_PROXY_PASS, proxyPass);
+ }
+ try {
+ Platform.addAuthorizationInfo(FAKE_URL, "proxy", "", authInfo); //$NON-NLS-1$ //$NON-NLS-2$
+ } catch (CoreException e) {
+ // We should probably wrap the CoreException here!
+ CVSProviderPlugin.log(e);
+ }
+ }
+
+ public synchronized ActiveChangeSetManager getChangeSetManager() {
+ if (changeSetManager == null) {
+ changeSetManager = new CVSActiveChangeSetCollector(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber());
+ }
+ return changeSetManager;
+ }
+
+ public IJSchService getJSchService() {
+ return (IJSchService)tracker.getService();
+ }
+
}

Back to the top