use of org.metaborg.core.language.ILanguageCache in project spoofax by metaborg.
the class LanguageChangeProcessor method removedImpl.
/**
* Implementation was removed
*
* @param impl
* Removed implementation
*/
protected void removedImpl(ILanguageImpl impl) {
for (ILanguageCache languageCache : languageCaches) {
languageCache.invalidateCache(impl);
}
parseResultProcessor.invalidate(impl);
analysisResultProcessor.invalidate(impl);
final Iterable<IEditor> editors = editorRegistry.openEditors();
for (IEditor editor : editors) {
final ILanguageImpl language = editor.language();
if (language != null && language.equals(impl)) {
editor.reconfigure();
editor.disable();
}
}
}
use of org.metaborg.core.language.ILanguageCache in project spoofax by metaborg.
the class LanguageChangeProcessor method reloadedImpl.
/**
* Implementation was reloaded
*
* @param impl
* Reloaded implementation
*/
protected void reloadedImpl(ILanguageImpl impl) {
for (ILanguageCache languageCache : languageCaches) {
languageCache.invalidateCache(impl);
}
parseResultProcessor.invalidate(impl);
analysisResultProcessor.invalidate(impl);
final Iterable<IEditor> editors = editorRegistry.openEditors();
for (IEditor editor : editors) {
final ILanguageImpl editorLanguage = editor.language();
if (editorLanguage == null || impl.equals(editorLanguage)) {
editor.reconfigure();
editor.forceUpdate();
}
}
}
Aggregations