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 {
102
102
103
103
private boolean splashEnded = false ;
104
104
private volatile boolean initialized ;
105
+ private volatile boolean stopped ;
105
106
private static final String KEYRING = "-keyring" ; //$NON-NLS-1$
106
107
private String keyringFile ;
107
108
@@ -182,8 +183,13 @@ public void addLogListener(ILogListener listener) {
182
183
183
184
private void assertInitialized () {
184
185
//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
+ }
187
193
}
188
194
189
195
/**
@@ -677,6 +683,7 @@ public void start(BundleContext runtimeContext) {
677
683
processCommandLine (getEnvironmentInfoService ().getNonFrameworkArgs ());
678
684
initializeDebugFlags ();
679
685
initialized = true ;
686
+ stopped = false ;
680
687
initializeAuthorizationHandler ();
681
688
startServices ();
682
689
}
@@ -691,6 +698,7 @@ public void stop(BundleContext bundleContext) {
691
698
stopServices (); // should be done after preferences shutdown
692
699
initialized = false ;
693
700
closeOSGITrackers ();
701
+ stopped = true ;
694
702
context = null ;
695
703
}
696
704
Original file line number Diff line number Diff line change @@ -29,7 +29,9 @@ public class Messages extends NLS {
29
29
30
30
// metadata
31
31
public static String meta_appNotInit ;
32
+ public static String meta_appStopped ;
32
33
public static String meta_exceptionParsingLog ;
34
+
33
35
// parsing/resolve
34
36
public static String plugin_deactivatedLoad ;
35
37
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ auth_notAvailable = Authorization infrastructure (org.eclipse.core.runtime.compa
19
19
20
20
# ## metadata
21
21
meta_appNotInit = The application has not been initialized.
22
+ meta_appStopped =The application is already stopped.
22
23
meta_exceptionParsingLog = An exception occurred while parsing the log file: {0}
23
24
24
25
# ## plugins
You can’t perform that action at this time.
0 commit comments