@@ -2425,6 +2425,9 @@ public Hashtable<String, String> getOptions() {
24252425 }
24262426 if (!Platform .isRunning ()) {
24272427 Hashtable <String , String > defaults = getDefaultOptionsNoInitialization ();
2428+ if (VERBOSE ) {
2429+ trace ("Setting Java options cache" ); //$NON-NLS-1$
2430+ }
24282431 this .optionsCache = defaults ;
24292432 return new Hashtable <>(defaults );
24302433 }
@@ -2460,7 +2463,7 @@ public Hashtable<String, String> getOptions() {
24602463
24612464 Util .fixTaskTags (options );
24622465 if (VERBOSE ) {
2463- trace ("Setting Java options" ); //$NON-NLS-1$
2466+ trace ("Setting Java options cache " ); //$NON-NLS-1$
24642467 }
24652468 // store built map in cache
24662469 this .optionsCache = new Hashtable <>(options );
@@ -5374,6 +5377,9 @@ public void setOptions(Hashtable<String, String> newOptions) {
53745377 getOptions ();
53755378 } else {
53765379 Util .fixTaskTags (cachedValue );
5380+ if (VERBOSE ) {
5381+ trace ("Setting Java options cache" ); //$NON-NLS-1$
5382+ }
53775383 // update cache
53785384 this .optionsCache = cachedValue ;
53795385 }
@@ -5394,6 +5400,9 @@ public void startup() throws CoreException {
53945400 this .propertyListener = new IEclipsePreferences .IPreferenceChangeListener () {
53955401 @ Override
53965402 public void preferenceChange (PreferenceChangeEvent event ) {
5403+ if (VERBOSE ) {
5404+ trace ("Invalidating Java options cache" ); //$NON-NLS-1$
5405+ }
53975406 JavaModelManager .this .optionsCache = null ;
53985407 }
53995408 };
@@ -5404,6 +5413,9 @@ public void preferenceChange(PreferenceChangeEvent event) {
54045413 @ Override
54055414 public void preferenceChange (PreferenceChangeEvent event ) {
54065415 if (ResourcesPlugin .PREF_ENCODING .equals (event .getKey ())) {
5416+ if (VERBOSE ) {
5417+ trace ("Invalidating Java options cache" ); //$NON-NLS-1$
5418+ }
54075419 JavaModelManager .this .optionsCache = null ;
54085420 }
54095421 }
0 commit comments