void (@NotNull VFilePropertyChangeEvent event) { stopDaemonAndRestartAllFiles("Virtual file name changed"); VirtualFile virtualFile = event.getFile(); PsiFile psiFile = !virtualFile.isValid() ? null : ((FileManagerImpl)PsiManagerEx.getInstanceEx(myProject).getFileManager()).getFastCachedPsiFile(virtualFile); if (psiFile == null || myDaemonCodeAnalyzer.isHighlightingAvailable(psiFile)) { return; } Document document = FileDocumentManager.getInstance().getCachedDocument(virtualFile); if (document == null) { return; } // when the file becomes un-highlighteable, clear all highlighters from previous HighlightPasses removeAllHighlightersFromHighlightPasses(document, project); }