Access project file index under read action with dispose check EA-110375

This commit is contained in:
Kirill Likhodedov
2017-10-31 10:57:47 +03:00
parent ab6b9717d4
commit f10693f02e
@@ -846,12 +846,16 @@ public class ProjectLevelVcsManagerImpl extends ProjectLevelVcsManagerEx impleme
@Override
public boolean isIgnored(VirtualFile vf) {
if (Registry.is("ide.hide.excluded.files")) {
return myExcludedIndex.isExcludedFile(vf);
}
else {
return myExcludedIndex.isUnderIgnored(vf);
}
return ReadAction.compute(() -> {
if (myProject.isDisposed()) return false;
if (Registry.is("ide.hide.excluded.files")) {
return myExcludedIndex.isExcludedFile(vf);
}
else {
return myExcludedIndex.isUnderIgnored(vf);
}
});
}
private boolean isInDirectoryBasedRoot(@Nullable VirtualFile file) {