drop saved fs state and force fs rescan on roots changed event

This commit is contained in:
Eugene Zhuravlev
2012-05-04 15:39:54 +02:00
parent ad5364f4fd
commit 466f07f272
2 changed files with 17 additions and 18 deletions
@@ -241,6 +241,7 @@ public class BuildManager implements ApplicationComponent{
}
public void clearState(Project project) {
myGlobals = null;
final String projectPath = getProjectPath(project);
synchronized (myProjectDataMap) {
final ProjectData data = myProjectDataMap.get(projectPath);
@@ -260,10 +261,6 @@ public class BuildManager implements ApplicationComponent{
return vFile != null ? vFile.getPath() : null;
}
private void clearGlobalsCache() {
myGlobals = null;
}
private void runAutoMake() {
if (ApplicationManager.getApplication().isUnitTestMode()) {
return;
@@ -778,7 +775,10 @@ public class BuildManager implements ApplicationComponent{
@Override
public void rootsChanged(final ModuleRootEvent event) {
clearGlobalsCache();
final Object source = event.getSource();
if (source instanceof Project) {
clearState((Project)source);
}
}
});
}