KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > internal > net > ProxyType


1 /*******************************************************************************
2  * Copyright (c) 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.core.internal.net;
12
13 import java.net.MalformedURLException JavaDoc;
14 import java.net.URL JavaDoc;
15 import java.util.*;
16
17 import org.eclipse.core.net.proxy.IProxyData;
18 import org.eclipse.core.runtime.*;
19 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
20 import org.eclipse.core.runtime.preferences.IEclipsePreferences.*;
21 import org.eclipse.osgi.util.NLS;
22 import org.osgi.service.prefs.BackingStoreException;
23 import org.osgi.service.prefs.Preferences;
24
25 public class ProxyType implements INodeChangeListener, IPreferenceChangeListener {
26
27     /**
28      * Preference keys
29      */

30     private static final String JavaDoc PREF_PROXY_DATA_NODE = "proxyData"; //$NON-NLS-1$
31
private static final String JavaDoc PREF_PROXY_HOST = "host"; //$NON-NLS-1$
32
private static final String JavaDoc PREF_PROXY_PORT = "port"; //$NON-NLS-1$
33
private static final String JavaDoc PREF_PROXY_HAS_AUTH = "hasAuth"; //$NON-NLS-1$
34

35     /**
36      * Verification tags used when creating a proxy data
37      */

38     public static int DO_NOT_VERIFY = 1;
39     public static int VERIFY_EMPTY = 2;
40     public static int VERIFY_EQUAL = 4;
41     
42     /**
43      * Constants that control the setting of the SOCKS system properties
44      */

45     private static final String JavaDoc PROP_SOCKS_SYSTEM_PROPERTY_HANDLING = "org.eclipse.net.core.setSocksSystemProperties"; //$NON-NLS-1$
46
public static final int ONLY_SET_FOR_1_5_OR_LATER = 0;
47     public static final int ALWAYS_SET = 1;
48     public static final int NEVER_SET = 2;
49     public static int socksSystemPropertySetting;
50     
51     /*
52      * Fields used to cache authentication information in the keyring
53      */

54     private static final String JavaDoc INFO_PROXY_USER = "user"; //$NON-NLS-1$
55
private static final String JavaDoc INFO_PROXY_PASS = "pass"; //$NON-NLS-1$
56
private static final URL JavaDoc FAKE_URL;
57     static {
58         URL JavaDoc temp = null;
59         try {
60             temp = new URL JavaDoc("http://org.eclipse.core.net.proxy.auth");//$NON-NLS-1$
61
} catch (MalformedURLException JavaDoc e) {
62             // Should never fail
63
}
64         FAKE_URL = temp;
65         String JavaDoc value = System.getProperty(PROP_SOCKS_SYSTEM_PROPERTY_HANDLING);
66         if (value == null) {
67             socksSystemPropertySetting = ONLY_SET_FOR_1_5_OR_LATER;
68         } else if (value.equals("always")) { //$NON-NLS-1$
69
socksSystemPropertySetting = ALWAYS_SET;
70         } else if (value.equals("never")) { //$NON-NLS-1$
71
socksSystemPropertySetting = NEVER_SET;
72         } else {
73             socksSystemPropertySetting = ONLY_SET_FOR_1_5_OR_LATER;
74         }
75     }
76     
77     private String JavaDoc name;
78     private boolean updatingPreferences;
79
80     public static String JavaDoc convertHostsToPropertyString(String JavaDoc[] value) {
81         StringBuffer JavaDoc buffer = new StringBuffer JavaDoc();
82
83         if (value == null)
84             return ""; //$NON-NLS-1$
85

86         if (value.length > 0) {
87             buffer.append(value[0]);
88         }
89
90         for (int index = 1; index < value.length; index++) {
91             buffer.append('|');
92             buffer.append(value[index]);
93         }
94
95         return buffer.toString();
96     }
97
98     public static String JavaDoc[] convertPropertyStringToHosts(String JavaDoc property) {
99         return property.split("\\|"); //$NON-NLS-1$
100
}
101
102     public ProxyType(String JavaDoc name) {
103         super();
104         this.name = name;
105     }
106
107     private Preferences getPreferenceNode() {
108         return getParentPreferences().node(getName());
109     }
110
111     /**
112      * Return the preferences node whose child nodes are the know proxy types
113      *
114      * @return a preferences node
115      */

116     private Preferences getParentPreferences() {
117         return Activator.getInstance().getInstancePreferences().node(
118                 PREF_PROXY_DATA_NODE);
119     }
120
121     public IProxyData getProxyData(int verifyFlag) {
122         return createProxyData(name, getPreferenceNode(), verifyFlag);
123     }
124
125     private IProxyData createProxyData(String JavaDoc type, Preferences node, int verifyFlag) {
126         String JavaDoc host = node.get(PREF_PROXY_HOST, null);
127         if (host != null && host.length() == 0)
128             host = null;
129         int port = node.getInt(PREF_PROXY_PORT, -1);
130         boolean requiresAuth = node.getBoolean(PREF_PROXY_HAS_AUTH, false);
131         ProxyData proxyData = new ProxyData(type, host, port, requiresAuth);
132         loadProxyAuth(proxyData);
133         if (verifyFlag == VERIFY_EMPTY) {
134             // We are initializing so verify that the system properties are empty
135
verifySystemPropertiesEmpty(type);
136         } else if (verifyFlag == VERIFY_EQUAL) {
137             // Verify that the data in the preferences matches the system properties
138
verifyDataMatchesSystemProperties(proxyData);
139         }
140         return proxyData;
141     }
142
143     public boolean setProxyData(IProxyData proxyData, boolean proxiesEnabled) {
144         Assert.isTrue(proxyData.getType().equals(getName()));
145         IProxyData oldData = getProxyData(VERIFY_EQUAL);
146         if (oldData.equals(proxyData))
147             return false;
148         saveProxyAuth(proxyData);
149         try {
150             updatingPreferences = true;
151             updatePreferences(proxyData);
152         } finally {
153             updatingPreferences = false;
154         }
155         updateSystemProperties(proxyData, proxiesEnabled);
156         return true;
157     }
158
159     private void updatePreferences(IProxyData proxyData) {
160         updatePreferences(getPreferenceNode(), proxyData);
161     }
162     
163     /* package */ void updatePreferencesIfMissing(Preferences node, IProxyData proxyData) {
164         Preferences proxyNode = node.node(PREF_PROXY_DATA_NODE).node(getName());
165         if (node.get(PREF_PROXY_HOST, null) == null)
166             updatePreferences(proxyNode, proxyData);
167     }
168     
169     private void updatePreferences(Preferences node, IProxyData proxyData) {
170         if (proxyData.getHost() == null) {
171             try {
172                 Preferences parent = node.parent();
173                 node.removeNode();
174                 parent.flush();
175             } catch (BackingStoreException e) {
176                 Activator.logError(NLS.bind(
177                         "An error occurred removing the {0} proxy node from the preference store", proxyData.getType()), e); //$NON-NLS-1$
178
}
179         } else {
180             node.put(PREF_PROXY_HOST, proxyData.getHost());
181             node.putInt(PREF_PROXY_PORT, proxyData.getPort());
182             node.putBoolean(PREF_PROXY_HAS_AUTH, proxyData.getUserId() != null);
183             try {
184                 node.flush();
185             } catch (BackingStoreException e) {
186                 Activator.logError(NLS.bind(
187                     "The {0} proxy node could not be written", proxyData.getType()), e); //$NON-NLS-1$
188
}
189         }
190     }
191     
192     /* package */void updateSystemProperties(IProxyData proxyData, boolean proxiesEnabled) {
193         try {
194             if (proxyData.getType().equals(IProxyData.HTTP_PROXY_TYPE)) {
195                 updateHttpSystemProperties(proxyData, proxiesEnabled);
196             } else if (proxyData.getType().equals(IProxyData.HTTPS_PROXY_TYPE)) {
197                 updateHttpsSystemProperties(proxyData, proxiesEnabled);
198             } else if (proxyData.getType().equals(IProxyData.SOCKS_PROXY_TYPE)) {
199                 updateSocksSystemProperties(proxyData, proxiesEnabled);
200             }
201         } catch (SecurityException JavaDoc e) {
202             Activator.logError("A security exception occurred while trying to put the proxy data into the system properties", e); //$NON-NLS-1$
203
}
204     }
205     
206     private boolean verifyDataMatchesSystemProperties(ProxyData proxyData) {
207         try {
208             boolean proxiesEnabled = ProxyManager.getProxyManager().isProxiesEnabled();
209             if (proxyData.getType().equals(IProxyData.HTTP_PROXY_TYPE)) {
210                 return verifyDataMatchesHttpSystemProperties(proxyData, proxiesEnabled);
211             } else if (proxyData.getType().equals(IProxyData.HTTPS_PROXY_TYPE)) {
212                 return verifyDataMatchesHttpsSystemProperties(proxyData, proxiesEnabled);
213             } else if (proxyData.getType().equals(IProxyData.SOCKS_PROXY_TYPE)) {
214                 return verifyDataMatchesSocksSystemProperties(proxyData, proxiesEnabled);
215             }
216             
217         } catch (SecurityException JavaDoc e) {
218             // Just ignore this here since it will be surfaced elsewhere
219
}
220         return true;
221     }
222
223     private boolean verifyDataMatchesHttpSystemProperties(ProxyData proxyData,
224             boolean proxiesEnabled) {
225         if (proxiesEnabled) {
226             boolean verified = true;
227             String JavaDoc dHost = proxyData.getHost();
228             if (!verifySystemPropertyEquals("http.proxyHost", dHost)) { //$NON-NLS-1$
229
verified = false;
230             } else if (dHost != null && !Boolean.getBoolean("http.proxySet")) { //$NON-NLS-1$
231
Activator.logInfo("The HTTP proxy is enabled in the preferences but disabled in the system settings", null); //$NON-NLS-1$
232
verified = false;
233             }
234             int port = proxyData.getPort();
235             if (!verifySystemPropertyEquals("http.proxyPort", port == -1 ? null : String.valueOf(port))) { //$NON-NLS-1$
236
verified = false;
237             }
238             return verified;
239         }
240         return verifyHttpSystemPropertiesEmpty();
241     }
242
243     private boolean verifyDataMatchesHttpsSystemProperties(ProxyData proxyData,
244             boolean proxiesEnabled) {
245         if (proxiesEnabled) {
246             boolean verified = true;
247             String JavaDoc dHost = proxyData.getHost();
248             if (!verifySystemPropertyEquals("https.proxyHost", dHost)) { //$NON-NLS-1$
249
verified = false;
250             } else if (dHost != null && !Boolean.getBoolean("https.proxySet")) { //$NON-NLS-1$
251
Activator.logInfo("The SSL proxy is enabled in the preferences but disabled in the system settings", null); //$NON-NLS-1$
252
verified = false;
253             }
254             int port = proxyData.getPort();
255             if (!verifySystemPropertyEquals("https.proxyPort", port == -1 ? null : String.valueOf(port))) { //$NON-NLS-1$
256
verified = false;
257             }
258             return verified;
259         }
260         return verifyHttpsSystemPropertiesEmpty();
261     }
262
263     private boolean verifyDataMatchesSocksSystemProperties(ProxyData proxyData,
264             boolean proxiesEnabled) {
265         if (proxiesEnabled && shouldSetSocksSystemProperties()) {
266             boolean verified = true;
267             String JavaDoc dHost = proxyData.getHost();
268             if (!verifySystemPropertyEquals("socksProxyHost", dHost)) { //$NON-NLS-1$
269
verified = false;
270             }
271             int port = proxyData.getPort();
272             if (!verifySystemPropertyEquals("socksProxyPort", port == -1 ? null : String.valueOf(port))) { //$NON-NLS-1$
273
verified = false;
274             }
275             return verified;
276         }
277         return verifySocksSystemPropertiesEmpty();
278     }
279     
280     private boolean shouldSetSocksSystemProperties() {
281         if (socksSystemPropertySetting == ALWAYS_SET)
282             return true;
283         if (socksSystemPropertySetting == NEVER_SET)
284             return false;
285         return hasJavaNetProxyClass();
286     }
287
288     private boolean verifySystemPropertyEquals(String JavaDoc key, String JavaDoc expected) {
289         String JavaDoc value = System.getProperty(key);
290         if (value == expected)
291             return true;
292         if (value == null && expected != null) {
293             Activator.logInfo(NLS.bind("System property {0} is not set but should be {1}.", key, expected), null); //$NON-NLS-1$
294
return false;
295         }
296         if (value != null && expected == null) {
297             Activator.logInfo(NLS.bind("System property {0} is set to {1} but should not be set.", key, value), null); //$NON-NLS-1$
298
return false;
299         }
300         if (!value.equals(expected)) {
301             Activator.logInfo(NLS.bind("System property {0} is set to {1} but should be {2}.", new Object JavaDoc[] {key, value, expected }), null); //$NON-NLS-1$
302
return false;
303         }
304         return true;
305     }
306
307     private boolean verifySystemPropertiesEmpty(String JavaDoc proxyType) {
308         try {
309             if (proxyType.equals(IProxyData.HTTP_PROXY_TYPE)) {
310                 return verifyHttpSystemPropertiesEmpty();
311             } else if (proxyType.equals(IProxyData.HTTPS_PROXY_TYPE)) {
312                 return verifyHttpsSystemPropertiesEmpty();
313             } else if (proxyType.equals(IProxyData.SOCKS_PROXY_TYPE)) {
314                 return verifySocksSystemPropertiesEmpty();
315             }
316         } catch (SecurityException JavaDoc e) {
317             // Just ignore this here since it will be surfaced elsewhere
318
}
319         return true;
320     }
321
322     private boolean verifyHttpSystemPropertiesEmpty() {
323         boolean verified = true;
324         verified &= verifyIsNotSet("http.proxySet"); //$NON-NLS-1$
325
verified &= verifyIsNotSet("http.proxyHost"); //$NON-NLS-1$
326
verified &= verifyIsNotSet("http.proxyPort"); //$NON-NLS-1$
327
verified &= verifyIsNotSet("http.nonProxyHosts"); //$NON-NLS-1$
328
verified &= verifyIsNotSet("http.proxyUser"); //$NON-NLS-1$
329
verified &= verifyIsNotSet("http.proxyUserName"); //$NON-NLS-1$
330
verified &= verifyIsNotSet("http.proxyPassword"); //$NON-NLS-1$
331
return verified;
332     }
333
334     private boolean verifyIsNotSet(String JavaDoc key) {
335         String JavaDoc value = System.getProperty(key);
336         if (value != null) {
337             Activator.logInfo(NLS.bind("System property {0} has been set to {1} by an external source. This value will be overwritten using the values from the preferences", key, value), null); //$NON-NLS-1$
338
}
339         return value == null;
340     }
341
342     private boolean verifyHttpsSystemPropertiesEmpty() {
343         boolean verified = true;
344         verified &= verifyIsNotSet("https.proxySet"); //$NON-NLS-1$
345
verified &= verifyIsNotSet("https.proxyHost"); //$NON-NLS-1$
346
verified &= verifyIsNotSet("https.proxyPort"); //$NON-NLS-1$
347
verified &= verifyIsNotSet("https.nonProxyHosts"); //$NON-NLS-1$
348
verified &= verifyIsNotSet("https.proxyUser"); //$NON-NLS-1$
349
verified &= verifyIsNotSet("https.proxyUserName"); //$NON-NLS-1$
350
verified &= verifyIsNotSet("https.proxyPassword"); //$NON-NLS-1$
351
return verified;
352     }
353
354     private boolean verifySocksSystemPropertiesEmpty() {
355         boolean verified = true;
356         verified &= verifyIsNotSet("socksProxyHost"); //$NON-NLS-1$
357
verified &= verifyIsNotSet("socksProxyPort"); //$NON-NLS-1$
358
return verified;
359     }
360
361     public String JavaDoc getName() {
362         return name;
363     }
364
365     private void updateHttpSystemProperties(IProxyData data, boolean proxiesEnabled) {
366         Assert.isTrue(data.getType().equals(IProxyData.HTTP_PROXY_TYPE));
367         Properties sysProps = System.getProperties();
368         if (!proxiesEnabled || data.getHost() == null) {
369             sysProps.remove("http.proxySet"); //$NON-NLS-1$
370
sysProps.remove("http.proxyHost"); //$NON-NLS-1$
371
sysProps.remove("http.proxyPort"); //$NON-NLS-1$
372
sysProps.remove("http.nonProxyHosts"); //$NON-NLS-1$
373
sysProps.remove("http.proxyUser"); //$NON-NLS-1$
374
sysProps.remove("http.proxyUserName"); //$NON-NLS-1$
375
sysProps.remove("http.proxyPassword"); //$NON-NLS-1$
376
} else {
377             sysProps.put("http.proxySet", "true"); //$NON-NLS-1$ //$NON-NLS-2$
378
sysProps.put("http.proxyHost", data.getHost()); //$NON-NLS-1$
379
int port = data.getPort();
380             if (port == -1) {
381                 sysProps.remove("http.proxyPort"); //$NON-NLS-1$
382
} else {
383                 sysProps.put("http.proxyPort", String.valueOf(port)); //$NON-NLS-1$
384
}
385             sysProps.put("http.nonProxyHosts", //$NON-NLS-1$
386
convertHostsToPropertyString(ProxyManager.getProxyManager().getNonProxiedHosts()));
387
388             String JavaDoc userid = data.getUserId();
389             String JavaDoc password = data.getPassword();
390             if (userid == null || password == null || userid.length() == 0
391                     || password.length() == 0) {
392                 sysProps.remove("http.proxyUser"); //$NON-NLS-1$
393
sysProps.remove("http.proxyUserName"); //$NON-NLS-1$
394
sysProps.remove("http.proxyPassword"); //$NON-NLS-1$
395
} else {
396                 sysProps.put("http.proxyUser", userid); //$NON-NLS-1$
397
sysProps.put("http.proxyUserName", userid); //$NON-NLS-1$
398
sysProps.put("http.proxyPassword", password); //$NON-NLS-1$
399
}
400         }
401     }
402     
403     private void updateHttpsSystemProperties(IProxyData data, boolean proxiesEnabled) {
404         Assert.isTrue(data.getType().equals(IProxyData.HTTPS_PROXY_TYPE));
405         Properties sysProps = System.getProperties();
406         if (!proxiesEnabled || data.getHost() == null) {
407             sysProps.remove("https.proxySet"); //$NON-NLS-1$
408
sysProps.remove("https.proxyHost"); //$NON-NLS-1$
409
sysProps.remove("https.proxyPort"); //$NON-NLS-1$
410
sysProps.remove("https.nonProxyHosts"); //$NON-NLS-1$
411
sysProps.remove("https.proxyUser"); //$NON-NLS-1$
412
sysProps.remove("https.proxyUserName"); //$NON-NLS-1$
413
sysProps.remove("https.proxyPassword"); //$NON-NLS-1$
414
} else {
415             sysProps.put("https.proxySet", "true"); //$NON-NLS-1$ //$NON-NLS-2$
416
sysProps.put("https.proxyHost", data.getHost()); //$NON-NLS-1$
417
int port = data.getPort();
418             if (port == -1) {
419                 sysProps.remove("https.proxyPort"); //$NON-NLS-1$
420
} else {
421                 sysProps.put("https.proxyPort", String.valueOf(port)); //$NON-NLS-1$
422
}
423             sysProps.put("https.nonProxyHosts", //$NON-NLS-1$
424
convertHostsToPropertyString(ProxyManager.getProxyManager().getNonProxiedHosts()));
425
426             String JavaDoc userid = data.getUserId();
427             String JavaDoc password = data.getPassword();
428             if (userid == null || password == null || userid.length() == 0
429                     || password.length() == 0) {
430                 sysProps.remove("https.proxyUser"); //$NON-NLS-1$
431
sysProps.remove("https.proxyUserName"); //$NON-NLS-1$
432
sysProps.remove("https.proxyPassword"); //$NON-NLS-1$
433
} else {
434                 sysProps.put("https.proxyUser", userid); //$NON-NLS-1$
435
sysProps.put("https.proxyUserName", userid); //$NON-NLS-1$
436
sysProps.put("https.proxyPassword", password); //$NON-NLS-1$
437
}
438         }
439     }
440     
441     private void updateSocksSystemProperties(IProxyData data, boolean proxiesEnabled) {
442         Assert.isTrue(data.getType().equals(IProxyData.SOCKS_PROXY_TYPE));
443         Properties sysProps = System.getProperties();
444         if (!proxiesEnabled || data.getHost() == null) {
445             sysProps.remove("socksProxyHost"); //$NON-NLS-1$
446
sysProps.remove("socksProxyPort"); //$NON-NLS-1$
447
} else {
448             if (!shouldSetSocksSystemProperties()) {
449                 // Log an error if we are not setting the property because we are using a pre-1.5 JRE
450
if (socksSystemPropertySetting == ONLY_SET_FOR_1_5_OR_LATER)
451                     Activator.logError("Setting the SOCKS system properties for a 1.4 VM can interfere with other proxy services (e.g. JSch). Please upgrade to a 1.5 JRE or later if you need to use Java's SOCKS proxy support.", null); //$NON-NLS-1$
452
return;
453             }
454             sysProps.put("socksProxyHost", data.getHost()); //$NON-NLS-1$
455
int port = data.getPort();
456             if (port == -1) {
457                 sysProps.remove("socksProxyPort"); //$NON-NLS-1$
458
} else {
459                 sysProps.put("socksProxyPort", String.valueOf(port)); //$NON-NLS-1$
460
}
461             // TODO: There does appear to be a way to set the non-proxy hosts for Socks
462
// TODO: See http://java.sun.com/j2se/1.5.0/docs/guide/net/properties.html for a description
463
// of how to set the Socks user and password
464
}
465     }
466
467     public void initialize(boolean proxiesEnabled) {
468         updateSystemProperties(getProxyData(VERIFY_EMPTY), proxiesEnabled);
469         ((IEclipsePreferences)getParentPreferences()).addNodeChangeListener(this);
470         ((IEclipsePreferences)getPreferenceNode()).addPreferenceChangeListener(this);
471     }
472     
473     private Map getAuthInfo() {
474         // Retrieve username and password from keyring.
475
Map authInfo = Platform.getAuthorizationInfo(FAKE_URL, getName(), ""); //$NON-NLS-1$
476
return authInfo != null ? authInfo : Collections.EMPTY_MAP;
477     }
478
479     private void loadProxyAuth(IProxyData data) {
480         Map authInfo = getAuthInfo();
481         data.setUserid((String JavaDoc)authInfo.get(INFO_PROXY_USER));
482         data.setPassword((String JavaDoc)authInfo.get(INFO_PROXY_PASS));
483     }
484     
485     private void saveProxyAuth(IProxyData data) {
486         Map authInfo = getAuthInfo();
487         if (authInfo.size() == 0) {
488             authInfo = new java.util.HashMap JavaDoc(4);
489         }
490         String JavaDoc proxyUser = data.getUserId();
491         if (proxyUser != null && data.getHost() != null) {
492             authInfo.put(INFO_PROXY_USER, proxyUser);
493         } else {
494             authInfo.remove(INFO_PROXY_USER);
495         }
496         String JavaDoc proxyPass = data.getPassword();
497         if (proxyPass != null && data.getHost() != null) {
498             authInfo.put(INFO_PROXY_PASS, proxyPass);
499         } else {
500             authInfo.remove(INFO_PROXY_PASS);
501         }
502         try {
503             if (authInfo.isEmpty()) {
504                 Platform.flushAuthorizationInfo(FAKE_URL, getName(), ""); //$NON-NLS-1$
505
} else {
506                 Platform.addAuthorizationInfo(FAKE_URL, getName(), "", authInfo); //$NON-NLS-1$
507
}
508         } catch (CoreException e) {
509             Activator.logError(e.getMessage(), e);
510         }
511     }
512     
513     private synchronized boolean hasJavaNetProxyClass() {
514         try {
515             Class JavaDoc proxyClass = Class.forName("java.net.Proxy"); //$NON-NLS-1$
516
return proxyClass != null;
517         } catch (ClassNotFoundException JavaDoc e) {
518             // Ignore
519
}
520         return false;
521     }
522
523     public void added(NodeChangeEvent event) {
524         // Add a preference listener so we'll get changes to the fields of the node
525
if (event.getChild().name().equals(getName()))
526             ((IEclipsePreferences)event.getChild()).addPreferenceChangeListener(this);
527     }
528
529     public void removed(NodeChangeEvent event) {
530         // Nothing to do
531
}
532
533     public void preferenceChange(PreferenceChangeEvent event) {
534         if (updatingPreferences)
535             return;
536         updateSystemProperties(getProxyData(DO_NOT_VERIFY), ProxyManager.getProxyManager().isProxiesEnabled());
537         
538     }
539
540 }
541
Popular Tags