void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PsiFile file = myFilePointer.getElement(); if (file == null) return; final VirtualFile virtualFile = file.getVirtualFile(); if (virtualFile == null) return; final ProjectFileIndex fileIndex = ProjectRootManager.getInstance(project).getFileIndex(); final VirtualFile contentRoot = fileIndex.getContentRootForFile(virtualFile); if (contentRoot == null) return; final VirtualFile sourceRoot = fileIndex.getSourceRootForFile(virtualFile); if (sourceRoot == null) { final String path = VfsUtilCore.getRelativePath(virtualFile, contentRoot, '/'); CompilerConfiguration.getInstance(project).addResourceFilePattern(path); } else { final String path = VfsUtilCore.getRelativePath(virtualFile, sourceRoot, '/'); final String sourceRootPath = VfsUtilCore.getRelativePath(sourceRoot, contentRoot, '/'); CompilerConfiguration.getInstance(project).addResourceFilePattern(sourceRootPath + ':' + path); } DaemonCodeAnalyzer.getInstance(project).restart(file); }