don't load stubs if any of the PSI roots was modified (EA-99102 - RE: FileTrees.withExclusiveStub)

This commit is contained in:
peter
2017-03-16 14:57:43 +01:00
parent b48a4ec981
commit 1f5676a39f
@@ -1169,7 +1169,9 @@ public abstract class PsiFileImpl extends ElementBase implements PsiFileEx, PsiF
}
public final boolean useStrongRefs() {
return myTrees.useStrongRefs;
if (myTrees.useStrongRefs) return true;
return myViewProvider instanceof MultiplePsiFilesPerDocumentFileViewProvider &&
myViewProvider.getAllFiles().stream().anyMatch(root -> root instanceof PsiFileImpl && ((PsiFileImpl)root).myTrees.useStrongRefs);
}
public boolean mayCacheAst() {