void (@NotNull DocumentEvent e) { Document document = e.getDocument(); VirtualFile virtualFile = FileDocumentManager.getInstance().getFile(document); Project project = virtualFile == null ? null : guessProject(virtualFile); //no need to stop daemon if something happened in the console or in non-physical document if (!myProject.isDisposed() && ApplicationManager.getApplication().isDispatchThread() && worthBothering(document, project)) { stopDaemon(true, "Document change"); UpdateHighlightersUtil.updateHighlightersByTyping(myProject, e); } }