boolean (@NotNull AbstractFileViewProvider viewProvider) { ApplicationManager.getApplication().assertReadAccessAllowed(); VirtualFile file = viewProvider.getVirtualFile(); if (getRawCachedViewProvider(file) != viewProvider) { return false; } if (viewProvider.getUserData(IN_COMA) == null) { return true; } if (shouldResurrect(viewProvider, file)) { viewProvider.putUserData(IN_COMA, null); LOG.assertTrue(getRawCachedViewProvider(file) == viewProvider); for (PsiFile psiFile : viewProvider.getCachedPsiFiles()) { // update "myPossiblyInvalidated" fields in files by calling "isValid" // that will call us recursively again, but since we're not IN_COMA now, we'll exit earlier and avoid SOE if (!psiFile.isValid()) { LOG.error(new PsiInvalidElementAccessException(psiFile)); } } return true; } getVFileToViewProviderMap().remove(file, viewProvider); file.replace(myPsiHardRefKey, viewProvider, null); viewProvider.putUserData(IN_COMA, null); return false; }