View | Details | Raw Unified | Return to bug 180921 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/core/tests/net/NetTest.java (-65 / +178 lines)
Lines 1-26 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
2
 * Copyright (c) 2007 IBM Corporation and others. All rights reserved. This
3
 * All rights reserved. This program and the accompanying materials
3
 * program and the accompanying materials are made available under the terms of
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * the Eclipse Public License v1.0 which accompanies this distribution, and is
5
 * which accompanies this distribution, and is available at
5
 * available at http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * 
7
 *
7
 * Contributors: IBM Corporation - initial API and implementation
8
 * Contributors:
8
 ******************************************************************************/
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.core.tests.net;
9
package org.eclipse.core.tests.net;
12
10
11
import java.net.URI;
13
import java.util.*;
12
import java.util.*;
14
13
15
import junit.framework.*;
14
import junit.framework.*;
16
15
17
import org.eclipse.core.internal.net.ProxyType;
16
import org.eclipse.core.internal.net.ProxyType;
17
import org.eclipse.core.internal.net.UnixProxyProvider;
18
import org.eclipse.core.net.proxy.AbstractProxyProvider;
18
import org.eclipse.core.net.proxy.IProxyData;
19
import org.eclipse.core.net.proxy.IProxyData;
19
import org.eclipse.core.net.proxy.IProxyService;
20
import org.eclipse.core.net.proxy.IProxyService;
20
import org.eclipse.core.runtime.CoreException;
21
import org.eclipse.core.runtime.CoreException;
21
22
22
public class NetTest extends TestCase {
23
public class NetTest extends TestCase {
23
	
24
24
	private boolean isSetEnabled;
25
	private boolean isSetEnabled;
25
	private Map dataCache = new HashMap();
26
	private Map dataCache = new HashMap();
26
27
Lines 31-37 Link Here
31
	public NetTest(String name) {
32
	public NetTest(String name) {
32
		super(name);
33
		super(name);
33
	}
34
	}
34
	
35
35
	public static Test suite() {
36
	public static Test suite() {
36
		return new TestSuite(NetTest.class);
37
		return new TestSuite(NetTest.class);
37
	}
38
	}
Lines 43-49 Link Here
43
		dataCache.clear();
44
		dataCache.clear();
44
		ProxyType.socksSystemPropertySetting = ProxyType.ALWAYS_SET;
45
		ProxyType.socksSystemPropertySetting = ProxyType.ALWAYS_SET;
45
	}
46
	}
46
	
47
47
	protected void tearDown() throws Exception {
48
	protected void tearDown() throws Exception {
48
		super.tearDown();
49
		super.tearDown();
49
		setProxiesEnabled(false);
50
		setProxiesEnabled(false);
Lines 54-75 Link Here
54
		}
55
		}
55
		getProxyManager().setProxyData(data);
56
		getProxyManager().setProxyData(data);
56
	}
57
	}
57
	
58
58
	private IProxyService getProxyManager() {
59
	private IProxyService getProxyManager() {
59
		return Activator.getDefault().getProxyService();
60
		return Activator.getDefault().getProxyService();
60
	}
61
	}
61
62
62
	private void assertProxyDataEqual(IProxyData expectedData) {
63
	private void assertProxyDataEqual(IProxyData expectedData) {
63
		IProxyData data = getProxyManager().getProxyData(expectedData.getType());
64
		IProxyData data = getProxyManager()
65
				.getProxyData(expectedData.getType());
64
		assertEquals(expectedData.getType(), data.getType());
66
		assertEquals(expectedData.getType(), data.getType());
65
		assertEquals(expectedData.getHost(), data.getHost());
67
		assertEquals(expectedData.getHost(), data.getHost());
66
		assertEquals(expectedData.getPort(), data.getPort());
68
		assertEquals(expectedData.getPort(), data.getPort());
67
		assertEquals(expectedData.getUserId(), data.getUserId());
69
		assertEquals(expectedData.getUserId(), data.getUserId());
68
		assertEquals(expectedData.getPassword(), data.getPassword());
70
		assertEquals(expectedData.getPassword(), data.getPassword());
69
		assertEquals(expectedData.isRequiresAuthentication(), data.isRequiresAuthentication());
71
		assertEquals(expectedData.isRequiresAuthentication(), data
72
				.isRequiresAuthentication());
70
		assertSystemPropertiesMatch(data);
73
		assertSystemPropertiesMatch(data);
71
	}
74
	}
72
	
75
73
	public void assertSystemPropertiesMatch(IProxyData proxyData) {
76
	public void assertSystemPropertiesMatch(IProxyData proxyData) {
74
		if (proxyData.getType().equals(IProxyData.HTTP_PROXY_TYPE)) {
77
		if (proxyData.getType().equals(IProxyData.HTTP_PROXY_TYPE)) {
75
			assertHttpSystemProperties(proxyData, "http");
78
			assertHttpSystemProperties(proxyData, "http");
Lines 80-104 Link Here
80
		}
83
		}
81
	}
84
	}
82
85
83
	private void assertHttpSystemProperties(IProxyData proxyData, String keyPrefix) {
86
	private void assertHttpSystemProperties(IProxyData proxyData,
87
			String keyPrefix) {
84
		Properties sysProps = System.getProperties();
88
		Properties sysProps = System.getProperties();
85
		
89
86
		if (this.getProxyManager().isProxiesEnabled()) {
90
		if (this.getProxyManager().isProxiesEnabled()) {
87
			boolean isSet = Boolean.getBoolean(keyPrefix + ".proxySet");
91
			boolean isSet = Boolean.getBoolean(keyPrefix + ".proxySet");
88
			assertEquals(proxyData.getHost() != null, isSet); //$NON-NLS-1$
92
			assertEquals(proxyData.getHost() != null, isSet); //$NON-NLS-1$
89
			assertEquals(proxyData.getHost(), sysProps.get(keyPrefix + ".proxyHost")); //$NON-NLS-1$
93
			assertEquals(proxyData.getHost(), sysProps.get(keyPrefix
90
			String portString = (String)sysProps.get(keyPrefix + ".proxyPort"); //$NON-NLS-1$
94
					+ ".proxyHost")); //$NON-NLS-1$
95
			String portString = (String) sysProps.get(keyPrefix + ".proxyPort"); //$NON-NLS-1$
91
			int port = -1;
96
			int port = -1;
92
			if (portString != null)
97
			if (portString != null)
93
				port = Integer.parseInt(portString);
98
				port = Integer.parseInt(portString);
94
			assertEquals(proxyData.getPort(), port);
99
			assertEquals(proxyData.getPort(), port);
95
			if (isSet)
100
			if (isSet)
96
				assertEquals(ProxyType.convertHostsToPropertyString(this.getProxyManager().getNonProxiedHosts()), sysProps.get(keyPrefix + ".nonProxyHosts")); //$NON-NLS-1$
101
				assertEquals(ProxyType.convertHostsToPropertyString(this
97
			else 
102
						.getProxyManager().getNonProxiedHosts()), sysProps
103
						.get(keyPrefix + ".nonProxyHosts")); //$NON-NLS-1$
104
			else
98
				assertNull(sysProps.get(keyPrefix + ".nonProxyHosts"));
105
				assertNull(sysProps.get(keyPrefix + ".nonProxyHosts"));
99
			assertEquals(proxyData.getUserId(), sysProps.get(keyPrefix + ".proxyUser")); //$NON-NLS-1$
106
			assertEquals(proxyData.getUserId(), sysProps.get(keyPrefix
100
			assertEquals(proxyData.getUserId(), sysProps.get(keyPrefix + ".proxyUserName")); //$NON-NLS-1$
107
					+ ".proxyUser")); //$NON-NLS-1$
101
			assertEquals(proxyData.getPassword(), sysProps.get(keyPrefix + ".proxyPassword")); //$NON-NLS-1$
108
			assertEquals(proxyData.getUserId(), sysProps.get(keyPrefix
109
					+ ".proxyUserName")); //$NON-NLS-1$
110
			assertEquals(proxyData.getPassword(), sysProps.get(keyPrefix
111
					+ ".proxyPassword")); //$NON-NLS-1$
102
		} else {
112
		} else {
103
			assertNull(sysProps.get(keyPrefix + ".proxySet"));
113
			assertNull(sysProps.get(keyPrefix + ".proxySet"));
104
			assertNull(sysProps.get(keyPrefix + ".proxyHost"));
114
			assertNull(sysProps.get(keyPrefix + ".proxyHost"));
Lines 114-120 Link Here
114
		Properties sysProps = System.getProperties();
124
		Properties sysProps = System.getProperties();
115
		if (this.getProxyManager().isProxiesEnabled()) {
125
		if (this.getProxyManager().isProxiesEnabled()) {
116
			assertEquals(proxyData.getHost(), sysProps.get("socksProxyHost")); //$NON-NLS-1$
126
			assertEquals(proxyData.getHost(), sysProps.get("socksProxyHost")); //$NON-NLS-1$
117
			String portString = (String)sysProps.get("socksProxyPort"); //$NON-NLS-1$
127
			String portString = (String) sysProps.get("socksProxyPort"); //$NON-NLS-1$
118
			int port = -1;
128
			int port = -1;
119
			if (portString != null)
129
			if (portString != null)
120
				port = Integer.parseInt(portString);
130
				port = Integer.parseInt(portString);
Lines 124-139 Link Here
124
			assertNull(sysProps.get("socksProxyPort"));
134
			assertNull(sysProps.get("socksProxyPort"));
125
		}
135
		}
126
	}
136
	}
127
	
137
128
	private IProxyData getProxyData(String type) {
138
	private IProxyData getProxyData(String type) {
129
		IProxyData data = (IProxyData)dataCache.get(type);
139
		IProxyData data = (IProxyData) dataCache.get(type);
130
		if (data == null) {
140
		if (data == null) {
131
			data = this.getProxyManager().getProxyData(type);
141
			data = this.getProxyManager().getProxyData(type);
132
			assertProxyDataEqual(data);
142
			assertProxyDataEqual(data);
133
		}
143
		}
134
		return data;
144
		return data;
135
	}
145
	}
136
	
146
137
	private void setProxyData(IProxyData data) throws CoreException {
147
	private void setProxyData(IProxyData data) throws CoreException {
138
		if (isSetEnabled) {
148
		if (isSetEnabled) {
139
			this.getProxyManager().setProxyData(new IProxyData[] { data });
149
			this.getProxyManager().setProxyData(new IProxyData[] { data });
Lines 142-153 Link Here
142
			dataCache.put(data.getType(), data);
152
			dataCache.put(data.getType(), data);
143
		}
153
		}
144
	}
154
	}
145
	
155
146
	private void disableProxy(IProxyData proxyData) throws CoreException {
156
	private void disableProxy(IProxyData proxyData) throws CoreException {
147
		proxyData.disable();
157
		proxyData.disable();
148
		setProxyData(proxyData);
158
		setProxyData(proxyData);
149
	}
159
	}
150
	
160
151
	private void changeProxyData(IProxyData oldData, IProxyData data)
161
	private void changeProxyData(IProxyData oldData, IProxyData data)
152
			throws CoreException {
162
			throws CoreException {
153
		// Make sure that setting the host doesn't change the persisted settings
163
		// Make sure that setting the host doesn't change the persisted settings
Lines 156-162 Link Here
156
		// Now set it in the manager and assert that it is set
166
		// Now set it in the manager and assert that it is set
157
		setProxyData(data);
167
		setProxyData(data);
158
	}
168
	}
159
	
169
160
	private void setHost(String type) throws CoreException {
170
	private void setHost(String type) throws CoreException {
161
		String host = "www.eclipse.org";
171
		String host = "www.eclipse.org";
162
		setHost(type, host);
172
		setHost(type, host);
Lines 168-206 Link Here
168
		data.setHost(host);
178
		data.setHost(host);
169
		changeProxyData(oldData, data);
179
		changeProxyData(oldData, data);
170
	}
180
	}
171
	
181
172
	private void setPort(String type, int port) throws CoreException {
182
	private void setPort(String type, int port) throws CoreException {
173
		IProxyData data = getProxyData(type);
183
		IProxyData data = getProxyData(type);
174
		IProxyData oldData = getProxyData(type);
184
		IProxyData oldData = getProxyData(type);
175
		data.setPort(port);
185
		data.setPort(port);
176
		changeProxyData(oldData, data);
186
		changeProxyData(oldData, data);
177
	}
187
	}
178
	
188
179
	private void setUser(String type, String user, String password) throws CoreException {
189
	private void setUser(String type, String user, String password)
190
			throws CoreException {
180
		IProxyData data = getProxyData(type);
191
		IProxyData data = getProxyData(type);
181
		IProxyData oldData = getProxyData(type);
192
		IProxyData oldData = getProxyData(type);
182
		data.setUserid(user);
193
		data.setUserid(user);
183
		data.setPassword(password);
194
		data.setPassword(password);
184
		changeProxyData(oldData, data);
195
		changeProxyData(oldData, data);
185
	}
196
	}
186
	
197
187
	private void setDataTest(String type) throws CoreException {
198
	private void setDataTest(String type) throws CoreException {
188
		setHost(type, "www.eclipse.org");
199
		setHost(type, "www.eclipse.org");
189
		setPort(type, 1024);
200
		setPort(type, 1024);
190
		setUser(type, "me", "passw0rd");
201
		setUser(type, "me", "passw0rd");
191
	}
202
	}
192
	
203
193
	private void setProxiesEnabled(boolean enabled) {
204
	private void setProxiesEnabled(boolean enabled) {
194
		this.getProxyManager().setProxiesEnabled(enabled);
205
		this.getProxyManager().setProxiesEnabled(enabled);
195
		assertEquals(enabled, this.getProxyManager().isProxiesEnabled());
206
		assertEquals(enabled, this.getProxyManager().isProxiesEnabled());
196
	}
207
	}
197
	
208
198
	private void delaySettingData() {
209
	private void delaySettingData() {
199
		isSetEnabled = false;
210
		isSetEnabled = false;
200
	}
211
	}
201
	
212
202
	private void performSettingData() throws CoreException {
213
	private void performSettingData() throws CoreException {
203
		IProxyData[] data = (IProxyData[]) dataCache.values().toArray(new IProxyData[dataCache.size()]);
214
		IProxyData[] data = (IProxyData[]) dataCache.values().toArray(
215
				new IProxyData[dataCache.size()]);
204
		this.getProxyManager().setProxyData(data);
216
		this.getProxyManager().setProxyData(data);
205
		for (int i = 0; i < data.length; i++) {
217
		for (int i = 0; i < data.length; i++) {
206
			IProxyData proxyData = data[i];
218
			IProxyData proxyData = data[i];
Lines 209-215 Link Here
209
		isSetEnabled = true;
221
		isSetEnabled = true;
210
		dataCache.clear();
222
		dataCache.clear();
211
	}
223
	}
212
	
224
213
	public void testIndividualSetAndClear() throws CoreException {
225
	public void testIndividualSetAndClear() throws CoreException {
214
		setDataTest(IProxyData.HTTP_PROXY_TYPE);
226
		setDataTest(IProxyData.HTTP_PROXY_TYPE);
215
		setDataTest(IProxyData.HTTPS_PROXY_TYPE);
227
		setDataTest(IProxyData.HTTPS_PROXY_TYPE);
Lines 220-233 Link Here
220
			disableProxy(proxyData);
232
			disableProxy(proxyData);
221
		}
233
		}
222
	}
234
	}
223
	
235
224
	public void testAllSetAndClear() throws CoreException {
236
	public void testAllSetAndClear() throws CoreException {
225
		delaySettingData();
237
		delaySettingData();
226
		setDataTest(IProxyData.HTTP_PROXY_TYPE);
238
		setDataTest(IProxyData.HTTP_PROXY_TYPE);
227
		setDataTest(IProxyData.HTTPS_PROXY_TYPE);
239
		setDataTest(IProxyData.HTTPS_PROXY_TYPE);
228
		setDataTest(IProxyData.SOCKS_PROXY_TYPE);
240
		setDataTest(IProxyData.SOCKS_PROXY_TYPE);
229
		performSettingData();
241
		performSettingData();
230
		
242
231
		delaySettingData();
243
		delaySettingData();
232
		IProxyData[] data = this.getProxyManager().getProxyData();
244
		IProxyData[] data = this.getProxyManager().getProxyData();
233
		for (int i = 0; i < data.length; i++) {
245
		for (int i = 0; i < data.length; i++) {
Lines 250-301 Link Here
250
		setProxiesEnabled(false);
262
		setProxiesEnabled(false);
251
		assertProxyDataEqual(data);
263
		assertProxyDataEqual(data);
252
	}
264
	}
253
	
265
254
	public void testSimpleHost() throws CoreException {
266
	public void testSimpleHost() throws CoreException {
255
		setDataTest(IProxyData.HTTP_PROXY_TYPE);
267
		setDataTest(IProxyData.HTTP_PROXY_TYPE);
256
		setDataTest(IProxyData.HTTPS_PROXY_TYPE);
268
		setDataTest(IProxyData.HTTPS_PROXY_TYPE);
257
		setDataTest(IProxyData.SOCKS_PROXY_TYPE);
269
		setDataTest(IProxyData.SOCKS_PROXY_TYPE);
258
		
270
259
		IProxyData[] allData = this.getProxyManager().getProxyDataForHost("www.randomhot.com");
271
		IProxyData[] allData = this.getProxyManager().getProxyDataForHost(
272
				"www.randomhot.com");
260
		assertEquals(3, allData.length);
273
		assertEquals(3, allData.length);
261
		
274
262
		IProxyData data = this.getProxyManager().getProxyDataForHost("www.randomhot.com", IProxyData.HTTP_PROXY_TYPE);
275
		IProxyData data = this.getProxyManager().getProxyDataForHost(
276
				"www.randomhot.com", IProxyData.HTTP_PROXY_TYPE);
263
		assertNotNull(data);
277
		assertNotNull(data);
264
		
278
265
		allData = this.getProxyManager().getProxyDataForHost("localhost");
279
		allData = this.getProxyManager().getProxyDataForHost("localhost");
266
		assertEquals(0, allData.length);
280
		assertEquals(0, allData.length);
267
		
281
268
		data = this.getProxyManager().getProxyDataForHost("localhost", IProxyData.HTTP_PROXY_TYPE);
282
		data = this.getProxyManager().getProxyDataForHost("localhost",
283
				IProxyData.HTTP_PROXY_TYPE);
269
		assertNull(data);
284
		assertNull(data);
270
	}
285
	}
271
	
286
272
	public void testHostPattern() throws CoreException {
287
	public void testHostPattern() throws CoreException {
273
		setDataTest(IProxyData.HTTP_PROXY_TYPE);
288
		setDataTest(IProxyData.HTTP_PROXY_TYPE);
274
		setDataTest(IProxyData.HTTPS_PROXY_TYPE);
289
		setDataTest(IProxyData.HTTPS_PROXY_TYPE);
275
		setDataTest(IProxyData.SOCKS_PROXY_TYPE);
290
		setDataTest(IProxyData.SOCKS_PROXY_TYPE);
276
		
291
277
		String[] oldHosts = this.getProxyManager().getNonProxiedHosts();
292
		String[] oldHosts = this.getProxyManager().getNonProxiedHosts();
278
		this.getProxyManager().setNonProxiedHosts(new String[] { "*ignore.com" });
293
		this.getProxyManager().setNonProxiedHosts(
279
		
294
				new String[] { "*ignore.com" });
280
		IProxyData[] allData = this.getProxyManager().getProxyDataForHost("www.randomhot.com");
295
296
		IProxyData[] allData = this.getProxyManager().getProxyDataForHost(
297
				"www.randomhot.com");
281
		assertEquals(3, allData.length);
298
		assertEquals(3, allData.length);
282
		
299
283
		IProxyData data = this.getProxyManager().getProxyDataForHost("www.randomhot.com", IProxyData.HTTP_PROXY_TYPE);
300
		IProxyData data = this.getProxyManager().getProxyDataForHost(
301
				"www.randomhot.com", IProxyData.HTTP_PROXY_TYPE);
284
		assertNotNull(data);
302
		assertNotNull(data);
285
		
303
286
		allData = this.getProxyManager().getProxyDataForHost("www.ignore.com");
304
		allData = this.getProxyManager().getProxyDataForHost("www.ignore.com");
287
		assertEquals(0, allData.length);
305
		assertEquals(0, allData.length);
288
		
306
289
		data = this.getProxyManager().getProxyDataForHost("www.ignore.com", IProxyData.HTTP_PROXY_TYPE);
307
		data = this.getProxyManager().getProxyDataForHost("www.ignore.com",
308
				IProxyData.HTTP_PROXY_TYPE);
290
		assertNull(data);
309
		assertNull(data);
291
		
310
292
		allData = this.getProxyManager().getProxyDataForHost("ignore.com");
311
		allData = this.getProxyManager().getProxyDataForHost("ignore.com");
293
		assertEquals(0, allData.length);
312
		assertEquals(0, allData.length);
294
		
313
295
		data = this.getProxyManager().getProxyDataForHost("ignore.com", IProxyData.HTTP_PROXY_TYPE);
314
		data = this.getProxyManager().getProxyDataForHost("ignore.com",
315
				IProxyData.HTTP_PROXY_TYPE);
296
		assertNull(data);
316
		assertNull(data);
297
		
317
298
		this.getProxyManager().setNonProxiedHosts(oldHosts);
318
		this.getProxyManager().setNonProxiedHosts(oldHosts);
299
	}
319
	}
300
320
321
	// This test case has to be manually setup and run because it depends on
322
	// whether the proxy is set in the native environment. It is here as
323
	// a convenience to test the native support.
324
	public void testNativeLinux() throws Exception {
325
326
		// Leave this test off for the automatic test runs so we don't
327
		// get confused by the settings that happen to be on the test machine
328
		if (true)
329
			return;
330
331
		AbstractProxyProvider pp = new UnixProxyProvider();
332
333
		IProxyData[] pd;
334
335
		// Test the following cases
336
		// 1) No proxy set anywhere
337
		// 2) http_proxy environment variable (use proxyIsSet)
338
		// 3) gconf-edit proxy (use proxyIsSet and proxyAuthIsSet)
339
		// 4) KDE proxy (use proxyIsSet and proxyAuthIsSet)
340
341
		// Toggle this if you have the proxy set up in the native environment
342
		boolean proxyIsSet = true;
343
344
		// Toggle this if you have the proxy authentication information setup
345
		boolean proxyAuthIsSet = true;
346
347
		String proxyHost = null;
348
		String proxyUser = null;
349
		String proxyPassword = null;
350
		boolean proxyReqAuth = false;
351
		int proxyPort = 0;
352
353
		if (proxyIsSet) {
354
			proxyHost = "berlioz";
355
			proxyPort = 3128;
356
			if (proxyAuthIsSet) {
357
				proxyUser = "user";
358
				proxyPassword = "password";
359
				proxyReqAuth = true;
360
			}
361
		}
362
363
		// Test HTTP
364
		pd = pp.select(new URI("http://bbc.com"));
365
		if (proxyIsSet) {
366
			assertEquals(1, pd.length);
367
			assertEquals(proxyHost, pd[0].getHost());
368
			assertEquals(proxyPort, pd[0].getPort());
369
			if (proxyAuthIsSet) {
370
				assertEquals(proxyUser, pd[0].getUserId());
371
				assertEquals(proxyPassword, pd[0].getPassword());
372
				assertEquals(proxyReqAuth, pd[0].isRequiresAuthentication());
373
			}
374
375
		} else {
376
			assertEquals(0, pd.length);
377
		}
378
379
		// Test HTTPS
380
		pd = pp.select(new URI("https://bbc.com"));
381
		if (proxyIsSet) {
382
			assertEquals(1, pd.length);
383
			assertEquals("https_" + proxyHost, pd[0].getHost());
384
			assertEquals(1 + proxyPort, pd[0].getPort());
385
		} else {
386
			assertEquals(0, pd.length);
387
		}
388
389
		// Test SOCKS
390
		pd = pp.select(new URI("SOCKS://bbc.com"));
391
		if (proxyIsSet) {
392
			assertEquals(1, pd.length);
393
			assertEquals("socks_" + proxyHost, pd[0].getHost());
394
			assertEquals(2 + proxyPort, pd[0].getPort());
395
		} else {
396
			assertEquals(0, pd.length);
397
		}
398
399
		// Test FTP
400
		pd = pp.select(new URI("FTP://bbc.com"));
401
		if (proxyIsSet) {
402
			assertEquals(1, pd.length);
403
			assertEquals("ftp_" + proxyHost, pd[0].getHost());
404
			assertEquals(3 + proxyPort, pd[0].getPort());
405
		} else {
406
			assertEquals(0, pd.length);
407
		}
408
409
		// Assume that localhost is a non-proxy host
410
		pd = pp.select(new URI("http://localhost"));
411
		assertEquals(0, pd.length);
412
	}
413
301
}
414
}
(-)src/org/eclipse/core/internal/net/ProxyData.java (-1 / +21 lines)
Lines 21-27 Link Here
21
	private String password;
21
	private String password;
22
	private boolean requiresAuthentication;
22
	private boolean requiresAuthentication;
23
23
24
	public ProxyData(String type, String host, int port, boolean requiresAuthentication) {
24
	public ProxyData(String type, String host, int port,
25
			boolean requiresAuthentication) {
25
		this.type = type;
26
		this.type = type;
26
		this.host = host;
27
		this.host = host;
27
		this.port = port;
28
		this.port = port;
Lines 71-76 Link Here
71
		requiresAuthentication = userid != null;
72
		requiresAuthentication = userid != null;
72
	}
73
	}
73
74
75
	public void setRequiresAuthentication(boolean req) {
76
		requiresAuthentication = req;
77
	}
78
74
	public boolean isRequiresAuthentication() {
79
	public boolean isRequiresAuthentication() {
75
		return requiresAuthentication;
80
		return requiresAuthentication;
76
	}
81
	}
Lines 83-86 Link Here
83
		requiresAuthentication = false;
88
		requiresAuthentication = false;
84
	}
89
	}
85
90
91
	public String toString() {
92
		StringBuffer stringBuffer = new StringBuffer();
93
		stringBuffer.append("host: "); //$NON-NLS-1$
94
		stringBuffer.append(host);
95
		stringBuffer.append(" port: "); //$NON-NLS-1$
96
		stringBuffer.append(port);
97
		stringBuffer.append(" user: "); //$NON-NLS-1$
98
		stringBuffer.append(user);
99
		stringBuffer.append(" password: "); //$NON-NLS-1$
100
		stringBuffer.append(password);
101
		stringBuffer.append(" reqAuth: "); //$NON-NLS-1$
102
		stringBuffer.append(requiresAuthentication);
103
		return stringBuffer.toString(); 
104
	}
105
86
}
106
}
(-)plugin.xml (+1 lines)
Lines 2-7 Link Here
2
<?eclipse version="3.2"?>
2
<?eclipse version="3.2"?>
3
<plugin>
3
<plugin>
4
   <extension-point id="authenticator" name="Authenticator" schema="schema/authenticator.exsd"/>
4
   <extension-point id="authenticator" name="Authenticator" schema="schema/authenticator.exsd"/>
5
   <extension-point id="proxyProviders" name="Proxy providers" schema="schema/proxyProviders.exsd"/>
5
   <extension
6
   <extension
6
         point="org.eclipse.core.runtime.preferences">
7
         point="org.eclipse.core.runtime.preferences">
7
      <initializer
8
      <initializer
(-)src/org/eclipse/core/internal/net/WindowsProxyProvider.java (+15 lines)
Added Link Here
1
package org.eclipse.core.internal.net;
2
3
import java.net.URI;
4
5
import org.eclipse.core.net.proxy.AbstractProxyProvider;
6
import org.eclipse.core.net.proxy.IProxyData;
7
8
public class WindowsProxyProvider extends AbstractProxyProvider {
9
10
	protected IProxyData[] getProxyData(URI uri) {
11
		// TODO Auto-generated method stub
12
		return null;
13
	}
14
15
}
(-)natives/unix/README.txt (+12 lines)
Added Link Here
1
The source for getting the native proxy info is in the top level unix directory.  If
2
there are more specific compile options, makefiles, etc, then they should be moved
3
to subdirectories, like in org.eclipse.core.filesystem.
4
5
The Debug directory actually has the make file; this is the makefile as generated by the CDT.
6
7
To build this, go into Debug and type "make", the library will be built in that same
8
directory.  Then you will need to copy the library to the correct org.eclipse.core.net.*
9
fragment.
10
11
There is no automatic build process for building the native code, instead the binary
12
shared libraries are checked in for each fragment, just like in org.eclipse.code.filesystem.
(-)schema/proxyProviders.exsd (+104 lines)
Added Link Here
1
<?xml version='1.0' encoding='UTF-8'?>
2
<!-- Schema file written by PDE -->
3
<schema targetNamespace="org.eclipse.core.net" xmlns="http://www.w3.org/2001/XMLSchema">
4
<annotation>
5
      <appinfo>
6
         <meta.schema plugin="org.eclipse.core.net" id="proxyProviders" name="Proxy providers"/>
7
      </appinfo>
8
      <documentation>
9
         [Enter description of this extension point.]
10
      </documentation>
11
   </annotation>
12
13
   <element name="extension">
14
      <complexType>
15
         <sequence>
16
            <element ref="refreshProvider"/>
17
         </sequence>
18
         <attribute name="point" type="string" use="required">
19
            <annotation>
20
               <documentation>
21
                  
22
               </documentation>
23
            </annotation>
24
         </attribute>
25
         <attribute name="id" type="string">
26
            <annotation>
27
               <documentation>
28
                  
29
               </documentation>
30
            </annotation>
31
         </attribute>
32
         <attribute name="name" type="string">
33
            <annotation>
34
               <documentation>
35
                  
36
               </documentation>
37
               <appinfo>
38
                  <meta.attribute translatable="true"/>
39
               </appinfo>
40
            </annotation>
41
         </attribute>
42
      </complexType>
43
   </element>
44
45
   <element name="refreshProvider">
46
      <complexType>
47
         <attribute name="name" type="string" use="required">
48
            <annotation>
49
               <documentation>
50
                  
51
               </documentation>
52
            </annotation>
53
         </attribute>
54
         <attribute name="class" type="string" use="required">
55
            <annotation>
56
               <documentation>
57
                  
58
               </documentation>
59
               <appinfo>
60
                  <meta.attribute kind="java" basedOn=":org.eclipse.core.net.proxy.IProxyProvider"/>
61
               </appinfo>
62
            </annotation>
63
         </attribute>
64
      </complexType>
65
   </element>
66
67
   <annotation>
68
      <appinfo>
69
         <meta.section type="since"/>
70
      </appinfo>
71
      <documentation>
72
         [Enter the first release in which this extension point appears.]
73
      </documentation>
74
   </annotation>
75
76
   <annotation>
77
      <appinfo>
78
         <meta.section type="examples"/>
79
      </appinfo>
80
      <documentation>
81
         [Enter extension point usage example here.]
82
      </documentation>
83
   </annotation>
84
85
   <annotation>
86
      <appinfo>
87
         <meta.section type="apiinfo"/>
88
      </appinfo>
89
      <documentation>
90
         [Enter API information here.]
91
      </documentation>
92
   </annotation>
93
94
   <annotation>
95
      <appinfo>
96
         <meta.section type="implementation"/>
97
      </appinfo>
98
      <documentation>
99
         [Enter information about supplied implementation of this extension point.]
100
      </documentation>
101
   </annotation>
102
103
104
</schema>
(-)src/org/eclipse/core/net/proxy/AbstractProxyProvider.java (+68 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2008 Oakland Software Incorporated 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
 *     Oakland Software Incorporated - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.core.net.proxy;
12
13
import java.net.URI;
14
15
/**
16
 * Returns eligible proxies based on the hosts configuration.
17
 * 
18
 * Subclasses implement the native code required to get the proxy information.
19
 * 
20
 * This intentionally has semantics similar to the Java ProxySelector class. The
21
 * idea is that when we drop support for Java versions earlier than 1.5 we can
22
 * easily re-implement this using the native Java support and remove the native
23
 * code associated with this implementation.
24
 * 
25
 * This is not intended to be subclassed by clients. This is not intended to be
26
 * instantiated by clients.
27
 * 
28
 * @since 3.4
29
 * 
30
 */
31
public abstract class AbstractProxyProvider {
32
33
	/**
34
	 * Return the IProxyData(s) that can be used with the given URI.
35
	 * 
36
	 * This considers the native proxy settings on the host. It includes the
37
	 * consideration of hosts for which no proxying is desired.
38
	 * 
39
	 * @param uri
40
	 *            the URI to for with the proxy is generated
41
	 * @return an array of IProxyData which are the applicable proxies for the
42
	 *         specified URI
43
	 * 
44
	 * @since 3.4
45
	 */
46
	public IProxyData[] select(URI uri) {
47
		String[] nonProxyHosts = getNonProxiedHosts();
48
		String host = uri.getHost();
49
50
		if (nonProxyHosts != null) {
51
			for (int npIndex = 0; npIndex < nonProxyHosts.length; npIndex++) {
52
				if (host.equals(nonProxyHosts[npIndex])) {
53
					return new IProxyData[0];
54
				}
55
			}
56
		}
57
58
		return getProxyData(uri);
59
	}
60
61
	protected abstract IProxyData[] getProxyData(URI uri);
62
63
	protected String[] getNonProxiedHosts() {
64
		// Default implementation, subclasses may override
65
		return new String[] {};
66
	}
67
68
}
(-)natives/unix/Debug/subdir.mk (+24 lines)
Added Link Here
1
################################################################################
2
# Automatically-generated file. Do not edit!
3
################################################################################
4
5
# Add inputs and outputs from these tool invocations to the build variables 
6
C_SRCS += \
7
../getsystemproxy.c 
8
9
OBJS += \
10
./getsystemproxy.o 
11
12
C_DEPS += \
13
./getsystemproxy.d 
14
15
16
# Each subdirectory must supply rules for building sources it contributes
17
%.o: ../%.c
18
	@echo 'Building file: $<'
19
	@echo 'Invoking: GCC C Compiler'
20
	gcc -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include/ -O0 -fPIC -g3 -Wall -c -fmessage-length=0 -m32 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<"
21
	@echo 'Finished building: $<'
22
	@echo ' '
23
24
(-)src/org/eclipse/core/internal/net/UnixProxyProvider.java (+81 lines)
Added Link Here
1
package org.eclipse.core.internal.net;
2
3
import java.net.URI;
4
import java.net.URISyntaxException;
5
6
import org.eclipse.core.net.proxy.AbstractProxyProvider;
7
import org.eclipse.core.net.proxy.IProxyData;
8
9
public class UnixProxyProvider extends AbstractProxyProvider {
10
11
	static {
12
		System.loadLibrary("proxysupport"); //$NON-NLS-1$
13
	}
14
15
	public UnixProxyProvider() {
16
		// Default constructor
17
	}
18
19
	public IProxyData[] getProxyData(URI uri) {
20
		String protocol = uri.getScheme();
21
22
		ProxyData pd = getSystemProxyInfo(protocol);
23
24
		if (pd != null) {
25
			IProxyData[] pds = new IProxyData[1];
26
			pds[0] = pd;
27
			return pds;
28
		}
29
30
		return new IProxyData[0];
31
	}
32
33
	protected String[] getNonProxiedHosts() {
34
		String[] npHosts = getGConfNonProxyHosts();
35
		if (npHosts != null && npHosts.length > 0)
36
			return npHosts;
37
		return getKdeNonProxyHosts();
38
	}
39
40
	// Returns null if something wrong or there is no proxy for the protocol
41
	protected ProxyData getSystemProxyInfo(String protocol) {
42
		ProxyData pd;
43
44
		// First try the environment variable which is a URL
45
		String sysHttp = System.getenv(protocol.toLowerCase() + "_proxy"); //$NON-NLS-1$
46
		if (sysHttp != null) {
47
			URI uri = null;
48
			try {
49
				uri = new URI(sysHttp);
50
			} catch (URISyntaxException e) {
51
				return null;
52
			}
53
			
54
			pd = new ProxyData(protocol);
55
			pd.setHost(uri.getHost());
56
			pd.setPort(uri.getPort());
57
			return pd;
58
		}
59
60
		// Then ask Gnome
61
		pd = getGConfProxyInfo(protocol);
62
		if (pd != null)
63
			return pd;
64
65
		// Then ask KDE
66
		pd = getKdeProxyInfo(protocol);
67
		if (pd != null)
68
			return pd;
69
70
		return null;
71
	}
72
73
	protected static native ProxyData getGConfProxyInfo(String protocol);
74
75
	protected static native String[] getGConfNonProxyHosts();
76
77
	protected static native ProxyData getKdeProxyInfo(String protocol);
78
79
	protected static native String[] getKdeNonProxyHosts();
80
81
}
(-)natives/unix/Debug/objects.mk (+7 lines)
Added Link Here
1
################################################################################
2
# Automatically-generated file. Do not edit!
3
################################################################################
4
5
USER_OBJS :=
6
7
LIBS := -lgconf-2 -lORBit-2 -lgthread-2.0 -lrt -lgobject-2.0 -lglib-2.0
(-)natives/unix/Debug/sources.mk (+17 lines)
Added Link Here
1
################################################################################
2
# Automatically-generated file. Do not edit!
3
################################################################################
4
5
O_SRCS := 
6
C_SRCS := 
7
S_SRCS := 
8
OBJ_SRCS := 
9
ASM_SRCS := 
10
OBJS := 
11
C_DEPS := 
12
LIBRARIES := 
13
14
# Every subdirectory with source files must be described here
15
SUBDIRS := \
16
. \
17
(-)natives/unix/Debug/makefile (+43 lines)
Added Link Here
1
################################################################################
2
# Automatically-generated file. Do not edit!
3
################################################################################
4
5
-include ../makefile.init
6
7
RM := rm -rf
8
9
# All of the sources participating in the build are defined here
10
-include sources.mk
11
-include subdir.mk
12
-include objects.mk
13
14
ifneq ($(MAKECMDGOALS),clean)
15
ifneq ($(strip $(C_DEPS)),)
16
-include $(C_DEPS)
17
endif
18
endif
19
20
-include ../makefile.defs
21
22
# Add inputs and outputs from these tool invocations to the build variables 
23
24
# All Target
25
all: libproxysupport.so
26
27
# Tool invocations
28
libproxysupport.so: $(OBJS) $(USER_OBJS)
29
	@echo 'Building target: $@'
30
	@echo 'Invoking: GCC C Linker'
31
	gcc -m32 -shared -o"libproxysupport.so" $(OBJS) $(USER_OBJS) $(LIBS)
32
	@echo 'Finished building target: $@'
33
	@echo ' '
34
35
# Other Targets
36
clean:
37
	-$(RM) $(OBJS)$(C_DEPS)$(LIBRARIES) libproxysupport.so
38
	-@echo ' '
39
40
.PHONY: all clean dependents
41
.SECONDARY:
42
43
-include ../makefile.targets
(-)natives/unix/getsystemproxy.c (+237 lines)
Added Link Here
1
/*
2
 * Copyright 2008 Oakland Software Incorporated 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
 *     Oakland Software Incorporated - initial API and implementation
10
 */
11
12
#include <jni.h>
13
14
#include <glib.h>
15
#include <glib/gslist.h>
16
#include <gconf/gconf-value.h>
17
#include <gconf/gconf-client.h>
18
19
#ifdef __linux__
20
#include <string.h>
21
#else
22
#include <strings.h>
23
#endif
24
25
static GConfClient *client= NULL;
26
27
static jclass proxyInfoClass;
28
static jclass stringClass;
29
static jmethodID proxyInfoConstructor;
30
static jmethodID toString;
31
32
static jmethodID hostMethod;
33
static jmethodID portMethod;
34
static jmethodID requiresAuthenticationMethod;
35
static jmethodID userMethod;
36
static jmethodID passwordMethod;
37
38
#define CHECK_NULL(X) { if ((X) == NULL) fprintf (stderr,"JNI error at line %d\n", __LINE__); } 
39
40
static void gconfInit(JNIEnv *env) {
41
	client = gconf_client_get_default();
42
	jclass cls= NULL;
43
	CHECK_NULL(cls = (*env)->FindClass(env, "org/eclipse/core/internal/net/ProxyData"));
44
	proxyInfoClass = (*env)->NewGlobalRef(env, cls);
45
46
	CHECK_NULL(cls = (*env)->FindClass(env, "java/lang/String"));
47
	stringClass = (*env)->NewGlobalRef(env, cls);
48
49
	CHECK_NULL(proxyInfoConstructor = (*env)->GetMethodID(env, proxyInfoClass, "<init>", "(Ljava/lang/String;)V"));
50
51
	CHECK_NULL(toString = (*env)->GetMethodID(env, proxyInfoClass, "toString", "()Ljava/lang/String;"));
52
53
	CHECK_NULL(hostMethod = (*env)->GetMethodID(env, proxyInfoClass, "setHost",
54
					"(Ljava/lang/String;)V"));
55
	CHECK_NULL(portMethod = (*env)->GetMethodID(env, proxyInfoClass, "setPort",
56
					"(I)V"));
57
	CHECK_NULL(requiresAuthenticationMethod= (*env)->GetMethodID(env, proxyInfoClass, "setRequiresAuthentication",
58
					"(Z)V"));
59
	CHECK_NULL(userMethod = (*env)->GetMethodID(env, proxyInfoClass, "setUserid",
60
					"(Ljava/lang/String;)V"));
61
	CHECK_NULL(passwordMethod = (*env)->GetMethodID(env, proxyInfoClass, "setPassword",
62
					"(Ljava/lang/String;)V"));
63
}
64
65
/*
66
 * Class:     org_eclipse_core_internal_net_UnixProxyProvider
67
 * Method:    getGConfProxyInfo
68
 * Signature: ([Ljava/lang/String);
69
 */
70
JNIEXPORT jobject JNICALL Java_org_eclipse_core_internal_net_UnixProxyProvider_getGConfProxyInfo(
71
		JNIEnv *env, jclass clazz, jstring protocol) {
72
73
	jboolean isCopy;
74
	const char *cprotocol;
75
76
	jobject proxyInfo= NULL;
77
78
	if (client == NULL) {
79
		gconfInit(env);
80
	}
81
82
	CHECK_NULL(proxyInfo = (*env)->NewObject(env, proxyInfoClass, proxyInfoConstructor, protocol));
83
84
	cprotocol = (*env)->GetStringUTFChars(env, protocol, &isCopy);
85
	if (cprotocol == NULL)
86
		return NULL;
87
88
	//printf("cprotocol: %s\n", cprotocol);
89
90
	if (strcasecmp(cprotocol, "http") == 0) {
91
		gboolean useProxy = gconf_client_get_bool(client,
92
				"/system/http_proxy/use_http_proxy", NULL);
93
		if (!useProxy) {
94
			proxyInfo = NULL;
95
			goto exit;
96
		}
97
98
		gchar *host = gconf_client_get_string(client,
99
				"/system/http_proxy/host", NULL);
100
		jobject jhost = (*env)->NewStringUTF(env, host);
101
		(*env)->CallVoidMethod(env, proxyInfo, hostMethod, jhost);
102
103
		gint port = gconf_client_get_int(client, "/system/http_proxy/port",
104
				NULL);
105
		(*env)->CallVoidMethod(env, proxyInfo, portMethod, port);
106
107
		gboolean reqAuth = gconf_client_get_bool(client,
108
				"/system/http_proxy/use_authentication", NULL);
109
		(*env)->CallVoidMethod(env, proxyInfo,
110
				requiresAuthenticationMethod, reqAuth);
111
		if (reqAuth) {
112
113
			gchar *user = gconf_client_get_string(client,
114
					"/system/http_proxy/authentication_user", NULL);
115
			jobject juser = (*env)->NewStringUTF(env, user);
116
			(*env)->CallVoidMethod(env, proxyInfo, userMethod, juser);
117
118
			gchar *password = gconf_client_get_string(client,
119
					"/system/http_proxy/authentication_password", NULL);
120
			jobject jpassword = (*env)->NewStringUTF(env, password);
121
			(*env)->CallVoidMethod(env, proxyInfo, passwordMethod,
122
					jpassword);
123
		}
124
		goto exit;
125
	}
126
127
	// Everything else applies only if the system proxy mode is manual
128
	gchar *mode = gconf_client_get_string(client, "/system/proxy/mode", NULL);
129
	if (strcasecmp(mode, "manual") != 0) {
130
		proxyInfo = NULL;
131
		goto exit;
132
	}
133
134
	char selector[100];
135
136
	if (strcasecmp(cprotocol, "https") == 0) {
137
		strcpy(selector, "/system/proxy/secure_");
138
	} else if (strcasecmp(cprotocol, "socks") == 0) {
139
		strcpy(selector, "/system/proxy/socks_");
140
	} else if (strcasecmp(cprotocol, "ftp") == 0) {
141
		strcpy(selector, "/system/proxy/ftp_");
142
	} else {
143
		proxyInfo = NULL;
144
		goto exit;
145
	}
146
147
	char useSelector[100];
148
	strcpy(useSelector, selector);
149
150
	gchar *host = gconf_client_get_string(client, strcat(useSelector, "host"),
151
			NULL);
152
	jobject jhost = (*env)->NewStringUTF(env, host);
153
	(*env)->CallVoidMethod(env, proxyInfo, hostMethod, jhost);
154
155
	strcpy(useSelector, selector);
156
	gint port = gconf_client_get_int(client, strcat(useSelector, "port"), NULL);
157
	(*env)->CallVoidMethod(env, proxyInfo, portMethod, port);
158
159
	exit: if (isCopy == JNI_TRUE)
160
		(*env)->ReleaseStringUTFChars(env, protocol, cprotocol);
161
	return proxyInfo;
162
}
163
164
typedef struct {
165
	jobjectArray npHostArray;
166
	JNIEnv *env;
167
	int index;
168
} ListProcContext;
169
170
// user_data is the ListProcContext
171
void listProc(gpointer data, gpointer user_data) {
172
	ListProcContext *lpc = user_data;
173
	jobject jnpHost = (*lpc->env)->NewStringUTF(lpc->env, (char *)data);
174
	(*lpc->env)->SetObjectArrayElement(lpc->env, lpc->npHostArray,
175
			lpc->index++, jnpHost);
176
}
177
178
/*
179
 * Class:     org_eclipse_core_internal_net_UnixProxyProvider
180
 * Method:    getGConfNonProxyHosts
181
 * Signature: ()[Ljava/lang/String;
182
 */
183
JNIEXPORT jobjectArray JNICALL Java_org_eclipse_core_internal_net_UnixProxyProvider_getGConfNonProxyHosts(
184
		JNIEnv *env, jclass clazz) {
185
186
	if (client == NULL) {
187
		gconfInit(env);
188
	}
189
190
	GSList *npHosts;
191
	int size;
192
193
	npHosts = gconf_client_get_list(client, "/system/http_proxy/ignore_hosts",
194
			GCONF_VALUE_STRING, NULL);
195
	size = g_slist_length(npHosts);
196
197
	// TODO - I'm not sure this is really valid, it's from the JVM implementation
198
	// of ProxySelector
199
	if (size == 0) {
200
		npHosts = gconf_client_get_list(client, "/system/proxy/no_proxy_for",
201
				GCONF_VALUE_STRING, NULL);
202
	}
203
	size = g_slist_length(npHosts);
204
205
	jobjectArray ret = (*env)->NewObjectArray(env, size, stringClass, NULL);
206
207
	ListProcContext lpc;
208
	lpc.env = env;
209
	lpc.npHostArray = ret;
210
	lpc.index = 0;
211
212
	g_slist_foreach(npHosts, listProc, &lpc);
213
	return ret;
214
}
215
216
/*
217
 * Class:     org_eclipse_core_internal_net_UnixProxyProvider
218
 * Method:    getKdeProxyInfo
219
 * Signature: ([Ljava/lang/String);
220
 */
221
JNIEXPORT jobject JNICALL Java_org_eclipse_core_internal_net_UnixProxyProvider_getKdeProxyInfo(
222
		JNIEnv *env, jclass clazz, jstring protocol) {
223
	//printf("getKdeProxyInfo - not implemented\n");
224
	return NULL;
225
}
226
227
/*
228
 * Class:     org_eclipse_core_internal_net_UnixProxyProvider
229
 * Method:    getKdeNonProxyHosts
230
 * Signature: ()Ljava/lang/String;
231
 */
232
JNIEXPORT jobject JNICALL Java_org_eclipse_core_internal_net_UnixProxyProvider_getKdeNonProxyHosts(
233
		JNIEnv *env, jclass clazz) {
234
	//printf("getKdeNonProxyHosts - not implemented\n");
235
	return NULL;
236
}
237

Return to bug 180921