Lines 18-23
Link Here
|
18 |
import java.util.Map; |
18 |
import java.util.Map; |
19 |
import java.util.TreeMap; |
19 |
import java.util.TreeMap; |
20 |
|
20 |
|
|
|
21 |
import org.eclipse.core.net.proxy.IProxyService; |
21 |
import org.eclipse.core.resources.IContainer; |
22 |
import org.eclipse.core.resources.IContainer; |
22 |
import org.eclipse.core.resources.IResource; |
23 |
import org.eclipse.core.resources.IResource; |
23 |
import org.eclipse.core.resources.ResourcesPlugin; |
24 |
import org.eclipse.core.resources.ResourcesPlugin; |
Lines 72-77
Link Here
|
72 |
import org.eclipse.ui.statushandlers.AbstractStatusHandler; |
73 |
import org.eclipse.ui.statushandlers.AbstractStatusHandler; |
73 |
import org.eclipse.update.core.SiteManager; |
74 |
import org.eclipse.update.core.SiteManager; |
74 |
import org.osgi.framework.Bundle; |
75 |
import org.osgi.framework.Bundle; |
|
|
76 |
import org.osgi.framework.ServiceReference; |
75 |
import org.osgi.framework.Version; |
77 |
import org.osgi.framework.Version; |
76 |
|
78 |
|
77 |
/** |
79 |
/** |
Lines 237-242
Link Here
|
237 |
public void postStartup() { |
239 |
public void postStartup() { |
238 |
try { |
240 |
try { |
239 |
refreshFromLocal(); |
241 |
refreshFromLocal(); |
|
|
242 |
activateProxyService(); |
240 |
checkUpdates(); |
243 |
checkUpdates(); |
241 |
((Workbench) PlatformUI.getWorkbench()).registerService( |
244 |
((Workbench) PlatformUI.getWorkbench()).registerService( |
242 |
ISelectionConversionService.class, |
245 |
ISelectionConversionService.class, |
Lines 251-256
Link Here
|
251 |
} |
254 |
} |
252 |
|
255 |
|
253 |
/** |
256 |
/** |
|
|
257 |
* Activate the proxy service by obtaining it. |
258 |
*/ |
259 |
private void activateProxyService() { |
260 |
Bundle bundle = Platform.getBundle("org.eclipse.core.net"); //$NON-NLS-1$ |
261 |
Object proxyService = null; |
262 |
if (bundle != null) { |
263 |
ServiceReference ref = bundle.getBundleContext().getServiceReference(IProxyService.class.getName()); |
264 |
if (ref != null) |
265 |
proxyService = bundle.getBundleContext().getService(ref); |
266 |
} |
267 |
if (proxyService == null) { |
268 |
IDEWorkbenchPlugin.log("Proxy service could not be found."); //$NON-NLS-1$ |
269 |
} |
270 |
} |
271 |
|
272 |
/** |
254 |
* Initialize the listener for settings changes. |
273 |
* Initialize the listener for settings changes. |
255 |
*/ |
274 |
*/ |
256 |
private void initializeSettingsChangeListener() { |
275 |
private void initializeSettingsChangeListener() { |