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 95492 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
226459_20080410.txt (text/plain), 6.40 KB, created by
Szymon Brandys
on 2008-04-10 05:47:17 EDT
(
hide
)
Description:
Fix
Filename:
MIME Type:
Creator:
Szymon Brandys
Created:
2008-04-10 05:47:17 EDT
Size:
6.40 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 10 Apr 2008 09:46:39 -0000 >@@ -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=Use system proxy if available >+ProxyPreferencePage_45=Specifies that system proxy settings are used to access the Internet. If such settings don't exists, 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 10 Apr 2008 09:46:39 -0000 >@@ -57,6 +57,7 @@ > Text userid; > Text password; > private IProxyService proxyService; >+ Button systemProxyConfigurationButton; > > public ProxyPreferencePage() { > super(NetUIMessages.ProxyPreferencePage_2); >@@ -93,6 +94,17 @@ > 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) { >+ enableControls(!systemProxyConfigurationButton.getSelection()); >+ } >+ }); >+ > directConnectionToButton = new Button(composite, SWT.RADIO); > directConnectionToButton.setLayoutData(new GridData()); > directConnectionToButton.setText(NetUIMessages.ProxyPreferencePage_3); >@@ -201,7 +213,7 @@ > entryList[0].hostname.addModifyListener(modifyListener); > entryList[0].port.addModifyListener(modifyListener); > >- initializeValues(proxyService.isProxiesEnabled()); >+ initializeValues(proxyService.isProxiesEnabled() , proxyService.isSystemProxiesEnabled()); > applyDialogFont(composite); > > // F1 >@@ -214,7 +226,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 +236,9 @@ > proxyData[index] = entryList[index].getProxy(); > } > >- proxyService.setProxiesEnabled(proxiesEnabled); >- if (proxiesEnabled) { >+ proxyService.setProxiesEnabled(manualProxiesEnabled || systemProxiesEnabled); >+ >+ if (manualProxiesEnabled) { > try { > proxyService.setNonProxiedHosts( > nonHostComposite.getList()); >@@ -233,11 +247,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 +281,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 +330,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 10 Apr 2008 09:46:39 -0000 >@@ -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