void (@NotNull VirtualFile file, @NotNull Document document) { FileViewProvider psiFile = fileManager.findCachedViewProvider(file); if (!file.isValid() || psiFile == null || !FileUtilRt.isTooLarge(file.getLength()) || psiFile instanceof PsiLargeFile) return; ApplicationManager.getApplication().runWriteAction((ExternalChangeAction)() -> fileManager.reloadPsiAfterTextChange(psiFile, file)); }