mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Safer dropping caches in ExternalAnnotationsManager.
This commit is contained in:
@@ -91,13 +91,17 @@ public class ExternalAnnotationsManagerImpl extends BaseExternalAnnotationsManag
|
||||
connection.subscribe(ProjectTopics.PROJECT_ROOTS, new ModuleRootAdapter() {
|
||||
@Override
|
||||
public void rootsChanged(ModuleRootEvent event) {
|
||||
myExternalAnnotations.clear();
|
||||
annotationsFileToDataAndModificationStamp.clear();
|
||||
myHasAnyAnnotationsRoots = ThreeState.UNSURE;
|
||||
dropCache();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dropCache() {
|
||||
super.dropCache();
|
||||
myHasAnyAnnotationsRoots = ThreeState.UNSURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean hasAnyAnnotationsRoots() {
|
||||
if (myHasAnyAnnotationsRoots == ThreeState.UNSURE) {
|
||||
|
||||
@@ -262,6 +262,8 @@ public abstract class BaseExternalAnnotationsManager extends ExternalAnnotations
|
||||
}
|
||||
|
||||
protected void dropCache() {
|
||||
myExternalAnnotations.clear();
|
||||
annotationsFileToDataAndModificationStamp.clear();
|
||||
cache.clear();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user