void (@NotNull PsiFile psiFile) { while (true) { PsiFile prev = myPsiFile; // jdk 6 doesn't have getAndSet() if (myPsiFileUpdater.compareAndSet(this, prev, psiFile)) { if (prev != psiFile && prev instanceof PsiFileEx) { DebugUtil.performPsiModification(getClass().getName() + " PSI change", () -> ((PsiFileEx)prev).markInvalidated()); } break; } } getManager().getFileManager().setViewProvider(getVirtualFile(), this); }