// Only do this if platform service exists
if (proxyService != null && proxyService.isProxiesEnabled()) {
// Setup via proxyService entry
URI uri = new URI(url);
final IProxyData[] proxies = proxyService.select(uri);
IProxyData selectedProxy = selectProxyFromProxies(uri.getScheme(), proxies);
if (selectedProxy != null) {
proxy = new Proxy(((selectedProxy.getType().equalsIgnoreCase(IProxyData.SOCKS_PROXY_TYPE)) ? Proxy.Type.SOCKS : Proxy.Type.HTTP), new ProxyAddress(selectedProxy.getHost(), selectedProxy.getPort()), selectedProxy.getUserId(), selectedProxy.getPassword());
}
}
} catch (Exception e) {
// If we don't even have the classes for this (i.e. the org.eclipse.core.net plugin not available)
// then we simply log and ignore