File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
runtime/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ public final class InternalPlatform {
102102
103103 private boolean splashEnded = false ;
104104 private volatile boolean initialized ;
105+ private volatile boolean stopped ;
105106 private static final String KEYRING = "-keyring" ; //$NON-NLS-1$
106107 private String keyringFile ;
107108
@@ -182,8 +183,13 @@ public void addLogListener(ILogListener listener) {
182183
183184 private void assertInitialized () {
184185 //avoid the Policy.bind if assertion is true
185- if (!initialized )
186- Assert .isTrue (false , Messages .meta_appNotInit );
186+ if (!initialized ) {
187+ if (stopped ) {
188+ Assert .isTrue (false , Messages .meta_appStopped );
189+ } else {
190+ Assert .isTrue (false , Messages .meta_appNotInit );
191+ }
192+ }
187193 }
188194
189195 /**
@@ -677,6 +683,7 @@ public void start(BundleContext runtimeContext) {
677683 processCommandLine (getEnvironmentInfoService ().getNonFrameworkArgs ());
678684 initializeDebugFlags ();
679685 initialized = true ;
686+ stopped = false ;
680687 initializeAuthorizationHandler ();
681688 startServices ();
682689 }
@@ -691,6 +698,7 @@ public void stop(BundleContext bundleContext) {
691698 stopServices (); // should be done after preferences shutdown
692699 initialized = false ;
693700 closeOSGITrackers ();
701+ stopped = true ;
694702 context = null ;
695703 }
696704
Original file line number Diff line number Diff line change @@ -29,7 +29,9 @@ public class Messages extends NLS {
2929
3030 // metadata
3131 public static String meta_appNotInit ;
32+ public static String meta_appStopped ;
3233 public static String meta_exceptionParsingLog ;
34+
3335 // parsing/resolve
3436 public static String plugin_deactivatedLoad ;
3537
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ auth_notAvailable = Authorization infrastructure (org.eclipse.core.runtime.compa
1919
2020# ## metadata
2121meta_appNotInit = The application has not been initialized.
22+ meta_appStopped =The application is already stopped.
2223meta_exceptionParsingLog = An exception occurred while parsing the log file: {0}
2324
2425# ## plugins
You can’t perform that action at this time.
0 commit comments