diff options
author | Thomas Watson | 2005-10-27 15:21:16 +0000 |
---|---|---|
committer | Thomas Watson | 2005-10-27 15:21:16 +0000 |
commit | 533e3722d2b548cc95944b0ee21ab6d327de63fb (patch) | |
tree | 7d2c9a9f0ab1762b18db08ecbf8aa12dd6b54cda | |
parent | d00f6d3576e48a41f588454be4c341a32c3952d5 (diff) | |
download | rt.equinox.framework-533e3722d2b548cc95944b0ee21ab6d327de63fb.tar.gz rt.equinox.framework-533e3722d2b548cc95944b0ee21ab6d327de63fb.tar.xz rt.equinox.framework-533e3722d2b548cc95944b0ee21ab6d327de63fb.zip |
(again) Fix endless restart problem when system bundle fragments are installed/uninstalled.v20051027
-rw-r--r-- | bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java b/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java index 7d7c03d50..3e3fa2fe5 100644 --- a/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java +++ b/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java @@ -284,16 +284,6 @@ public class EclipseStarter { context = osgi.getBundleContext(); if ("true".equals(System.getProperty(PROP_REFRESH_BUNDLES))) //$NON-NLS-1$ refreshPackages(getCurrentBundles(false)); - if (Boolean.getBoolean(PROP_FORCED_RESTART)) { - // wait for the system bundle to stop - Bundle systemBundle = context.getBundle(0); - int i = 0; - while (i < 5000 && (systemBundle.getState() & (Bundle.ACTIVE | Bundle.STOPPING)) != 0) { - i += 200; - Thread.sleep(200); - } - return; - } publishSplashScreen(endSplashHandler); if (Profile.PROFILE && Profile.STARTUP) Profile.logTime("EclipseStarter.startup()", "loading basic bundles"); //$NON-NLS-1$ //$NON-NLS-2$ @@ -648,6 +638,19 @@ public class EclipseStarter { semaphore.acquire(); context.removeFrameworkListener(listener); context.ungetService(packageAdminRef); + if (Boolean.getBoolean(PROP_FORCED_RESTART)) { + // wait for the system bundle to stop + Bundle systemBundle = context.getBundle(0); + int i = 0; + while (i < 5000 && (systemBundle.getState() & (Bundle.ACTIVE | Bundle.STOPPING)) != 0) { + i += 200; + try { + Thread.sleep(200); + } catch (InterruptedException e) { + break; + } + } + } } /** |