Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 95891 Details for
Bug 226459
[Proxy] UI for system proxy settings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Fix 2
226459_20080414.txt (text/plain), 8.79 KB, created by
Szymon Brandys
on 2008-04-14 06:32:45 EDT
(
hide
)
Description:
Fix 2
Filename:
MIME Type:
Creator:
Szymon Brandys
Created:
2008-04-14 06:32:45 EDT
Size:
8.79 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.net >Index: src/org/eclipse/ui/internal/net/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/messages.properties,v >retrieving revision 1.4 >diff -u -r1.4 messages.properties >--- src/org/eclipse/ui/internal/net/messages.properties 30 Apr 2007 19:07:45 -0000 1.4 >+++ src/org/eclipse/ui/internal/net/messages.properties 14 Apr 2008 10:31:58 -0000 >@@ -1,5 +1,5 @@ > ############################################################################### >-# Copyright (c) 2000, 2007 IBM Corporation and others. >+# Copyright (c) 2000, 2008 IBM Corporation and others. > # All rights reserved. This program and the accompanying materials > # are made available under the terms of the Eclipse Public License v1.0 > # which accompanies this distribution, and is available at >@@ -44,6 +44,8 @@ > ProxyPreferencePage_41=The host name cannot begin or end with a space character > ProxyPreferencePage_42=Invalid port > ProxyPreferencePage_43=The port must be an integer >+ProxyPreferencePage_44=System proxy configuration (if available) >+ProxyPreferencePage_45=Specifies that system proxy settings are used to access the Internet. If such settings can't be retrieved, no proxy should be used. > UserValidationDialog_0=Password Required > UserValidationDialog_1=Connect to: {0} > UserValidationDialog_2=&Password: >Index: src/org/eclipse/ui/internal/net/ProxyPreferencePage.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/ProxyPreferencePage.java,v >retrieving revision 1.10 >diff -u -r1.10 ProxyPreferencePage.java >--- src/org/eclipse/ui/internal/net/ProxyPreferencePage.java 10 Jan 2008 09:00:13 -0000 1.10 >+++ src/org/eclipse/ui/internal/net/ProxyPreferencePage.java 14 Apr 2008 10:31:58 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007 IBM Corporation and others. >+ * Copyright (c) 2007, 2008 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -47,7 +47,7 @@ > > Entry[] entryList; > Button directConnectionToButton; >- private Button manualProxyConfigurationButton; >+ Button manualProxyConfigurationButton; > Button useSameProxyButton; > private Label nonHostLabel; > private NonProxyHostsComposite nonHostComposite; >@@ -57,6 +57,7 @@ > Text userid; > Text password; > private IProxyService proxyService; >+ Button systemProxyConfigurationButton; > > public ProxyPreferencePage() { > super(NetUIMessages.ProxyPreferencePage_2); >@@ -93,6 +94,18 @@ > GridData data = new GridData(GridData.FILL_BOTH); > composite.setLayoutData(data); > >+ systemProxyConfigurationButton = new Button(composite, SWT.RADIO); >+ systemProxyConfigurationButton.setLayoutData(new GridData()); >+ systemProxyConfigurationButton.setText(NetUIMessages.ProxyPreferencePage_44); >+ systemProxyConfigurationButton >+ .setToolTipText(NetUIMessages.ProxyPreferencePage_45); >+ systemProxyConfigurationButton.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ if (systemProxyConfigurationButton.getSelection()) >+ enableControls(false); >+ } >+ }); >+ > directConnectionToButton = new Button(composite, SWT.RADIO); > directConnectionToButton.setLayoutData(new GridData()); > directConnectionToButton.setText(NetUIMessages.ProxyPreferencePage_3); >@@ -100,7 +113,8 @@ > .setToolTipText(NetUIMessages.ProxyPreferencePage_1); > directConnectionToButton.addSelectionListener(new SelectionAdapter() { > public void widgetSelected(SelectionEvent e) { >- enableControls(!directConnectionToButton.getSelection()); >+ if (directConnectionToButton.getSelection()) >+ enableControls(false); > } > }); > >@@ -109,6 +123,12 @@ > .setText(NetUIMessages.ProxyPreferencePage_4); > manualProxyConfigurationButton > .setToolTipText(NetUIMessages.ProxyPreferencePage_0); >+ manualProxyConfigurationButton.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ if (manualProxyConfigurationButton.getSelection()) >+ enableControls(true); >+ } >+ }); > > final Composite manualProxyConfigurationComposite = new Composite( > composite, SWT.NONE); >@@ -201,7 +221,7 @@ > entryList[0].hostname.addModifyListener(modifyListener); > entryList[0].port.addModifyListener(modifyListener); > >- initializeValues(proxyService.isProxiesEnabled()); >+ initializeValues(proxyService.isProxiesEnabled() , proxyService.isSystemProxiesEnabled()); > applyDialogFont(composite); > > // F1 >@@ -214,7 +234,8 @@ > protected void performApply() { > if (proxyService == null) > return; >- boolean proxiesEnabled = manualProxyConfigurationButton.getSelection(); >+ boolean manualProxiesEnabled = manualProxyConfigurationButton.getSelection(); >+ boolean systemProxiesEnabled = systemProxyConfigurationButton.getSelection(); > > // Save the contents of the text fields to the proxy data. > IProxyData[] proxyData = new IProxyData[entryList.length]; >@@ -223,8 +244,9 @@ > proxyData[index] = entryList[index].getProxy(); > } > >- proxyService.setProxiesEnabled(proxiesEnabled); >- if (proxiesEnabled) { >+ proxyService.setProxiesEnabled(manualProxiesEnabled || systemProxiesEnabled); >+ >+ if (manualProxiesEnabled) { > try { > proxyService.setNonProxiedHosts( > nonHostComposite.getList()); >@@ -233,11 +255,15 @@ > ErrorDialog.openError(getShell(), null, null, e.getStatus()); > } > } >+ >+ proxyService.setSystemProxiesEnabled(systemProxiesEnabled); >+ > Activator.getDefault().savePluginPreferences(); > } > > protected void performDefaults() { > directConnectionToButton.setSelection(true); >+ systemProxyConfigurationButton.setSelection(false); > manualProxyConfigurationButton.setSelection(false); > useSameProxyButton.setSelection(false); > enableProxyAuth.setSelection(false); >@@ -263,17 +289,18 @@ > * > * @param proxiesEnabled indicates if manual proxies are enabled or not. > */ >- private void initializeValues(boolean proxiesEnabled) { >- >+ private void initializeValues(boolean proxiesEnabled, boolean systemProxiesEnabled) { > directConnectionToButton.setSelection(!proxiesEnabled); >- manualProxyConfigurationButton.setSelection(proxiesEnabled); >+ manualProxyConfigurationButton.setSelection(proxiesEnabled && !systemProxiesEnabled); >+ systemProxyConfigurationButton.setSelection(proxiesEnabled && systemProxiesEnabled); >+ > > String[] nonHostLists = null; > if (proxyService != null) > nonHostLists = proxyService.getNonProxiedHosts(); > this.nonHostComposite.setList(nonHostLists == null ? new String[] { > "localhost", "127.0.0.1" } : nonHostLists); //$NON-NLS-1$ //$NON-NLS-2$ >- if (!proxiesEnabled) { >+ if (proxiesEnabled && !systemProxiesEnabled) { > this.useSameProxyButton.setSelection(false); > this.enableProxyAuth.setSelection(false); > this.userid.setText(""); //$NON-NLS-1$ >@@ -311,10 +338,10 @@ > for (int index = 1; index < entryList.length; index++) { > Entry entry = entryList[index]; > entry.loadPreviousValues(); >- entry.updateEnablement(proxiesEnabled, useSameProtocol); >+ entry.updateEnablement(proxiesEnabled && !systemProxiesEnabled, useSameProtocol); > } > >- enableControls(proxiesEnabled); >+ enableControls(proxiesEnabled && !systemProxiesEnabled); > } > > void enableControls(boolean enabled) { >Index: src/org/eclipse/ui/internal/net/NetUIMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/NetUIMessages.java,v >retrieving revision 1.4 >diff -u -r1.4 NetUIMessages.java >--- src/org/eclipse/ui/internal/net/NetUIMessages.java 30 Apr 2007 19:07:45 -0000 1.4 >+++ src/org/eclipse/ui/internal/net/NetUIMessages.java 14 Apr 2008 10:31:58 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2007 IBM Corporation and others. >+ * Copyright (c) 2000, 2008 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -76,6 +76,10 @@ > public static String ProxyPreferencePage_8; > > public static String ProxyPreferencePage_9; >+ >+ public static String ProxyPreferencePage_44; >+ >+ public static String ProxyPreferencePage_45; > > public static String TITLE_PREFERENCE_HOSTS_DIALOG; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 226459
:
95492
| 95891