boolean (@NotNull Project project) { Iterator<Library> iterator = LibraryTablesRegistrar.getInstance().getLibraryTable(project).getLibraryIterator(); while (iterator.hasNext()) { Library library = iterator.next(); for (VirtualFile virtualFile : library.getFiles(OrderRootType.CLASSES)) { if (GroovyConfigUtils.GROOVY_JAR_PATTERN.matcher(virtualFile.getName()).matches() || GroovyConfigUtils.matchesGroovyAll(virtualFile.getName())) { List<OrderEntry> orderEntries = ProjectFileIndex.getInstance(project).getOrderEntriesForFile(virtualFile); if (!orderEntries.isEmpty()) { return true; } } } } return false; }