boolean (@NotNull final VirtualFile file) { for (Project project : ProjectManager.getInstance().getOpenProjects()) { if (!project.isInitialized() || !BuildManager.getInstance().isProjectWatched(project)) { continue; } if (ProjectRootManager.getInstance(project).getFileIndex().isInContent(file)) { return true; } } return false; }