Lines 1423-1433
Link Here
|
1423 |
/** |
1423 |
/** |
1424 |
* Listener on properties changes. |
1424 |
* Listener on properties changes. |
1425 |
*/ |
1425 |
*/ |
1426 |
IEclipsePreferences.IPreferenceChangeListener propertyListener = new IEclipsePreferences.IPreferenceChangeListener() { |
1426 |
IEclipsePreferences.IPreferenceChangeListener propertyListener; |
1427 |
public void preferenceChange(PreferenceChangeEvent event) { |
1427 |
IEclipsePreferences.IPreferenceChangeListener resourcesPropertyListener; |
1428 |
JavaModelManager.this.optionsCache = null; |
|
|
1429 |
} |
1430 |
}; |
1431 |
|
1428 |
|
1432 |
/** |
1429 |
/** |
1433 |
* Constructs a new JavaModelManager |
1430 |
* Constructs a new JavaModelManager |
Lines 4465-4470
Link Here
|
4465 |
} |
4462 |
} |
4466 |
}; |
4463 |
}; |
4467 |
new InstanceScope().getNode(JavaCore.PLUGIN_ID).addPreferenceChangeListener(this.propertyListener); |
4464 |
new InstanceScope().getNode(JavaCore.PLUGIN_ID).addPreferenceChangeListener(this.propertyListener); |
|
|
4465 |
|
4466 |
// listen for encoding changes (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=255501 ) |
4467 |
this.resourcesPropertyListener = new IEclipsePreferences.IPreferenceChangeListener() { |
4468 |
public void preferenceChange(PreferenceChangeEvent event) { |
4469 |
if (ResourcesPlugin.PREF_ENCODING.equals(event.getKey())) { |
4470 |
JavaModelManager.this.optionsCache = null; |
4471 |
} |
4472 |
} |
4473 |
}; |
4474 |
String resourcesPluginId = ResourcesPlugin.getPlugin().getBundle().getSymbolicName(); |
4475 |
new InstanceScope().getNode(resourcesPluginId).addPreferenceChangeListener(this.resourcesPropertyListener); |
4468 |
|
4476 |
|
4469 |
// Listen to content-type changes |
4477 |
// Listen to content-type changes |
4470 |
Platform.getContentTypeManager().addContentTypeChangeListener(this); |
4478 |
Platform.getContentTypeManager().addContentTypeChangeListener(this); |
Lines 4561-4566
Link Here
|
4561 |
((IEclipsePreferences) this.preferencesLookup[PREF_INSTANCE].parent()).removeNodeChangeListener(this.instanceNodeListener); |
4569 |
((IEclipsePreferences) this.preferencesLookup[PREF_INSTANCE].parent()).removeNodeChangeListener(this.instanceNodeListener); |
4562 |
this.preferencesLookup[PREF_INSTANCE].removePreferenceChangeListener(this.instancePreferencesListener); |
4570 |
this.preferencesLookup[PREF_INSTANCE].removePreferenceChangeListener(this.instancePreferencesListener); |
4563 |
this.preferencesLookup[PREF_INSTANCE] = null; |
4571 |
this.preferencesLookup[PREF_INSTANCE] = null; |
|
|
4572 |
String resourcesPluginId = ResourcesPlugin.getPlugin().getBundle().getSymbolicName(); |
4573 |
new InstanceScope().getNode(resourcesPluginId).removePreferenceChangeListener(this.resourcesPropertyListener); |
4564 |
|
4574 |
|
4565 |
// wait for the initialization job to finish |
4575 |
// wait for the initialization job to finish |
4566 |
try { |
4576 |
try { |