in src/main/kotlin/com/github/mkartashev/hserr/toolwindow/HsErrToolWindowFactory.kt [243:254]
fun maybeUpdateUI(newFile: VirtualFile, editor: Editor?) {
val psiFile = PsiManager.getInstance(toolWindow.project).findFile(newFile) ?: return
if (isHsErr(psiFile)) {
if (!isTooLarge(Files.size(newFile.toNioPath()))) {
updateUIForFile(newFile, editor)
} else {
resetUIWithComment(HsErrBundle.message("fileIsTooLargeText"))
}
} else {
resetUIWithComment(HsErrBundle.message("wrongFileLang"))
}
}