boolean (Library library) { String[] classRoots = library.getUrls( OrderRootType.CLASSES); if (classRoots.length != 1) return true; String classes = classRoots[0]; if (!classes.endsWith("!/")) return true; int dotPos = classes.lastIndexOf("/", classes.length() - 2 /* trim ending !/ */); if (dotPos == -1) return true; String pathToJar = classes.substring(0, dotPos); if (hasUserPaths(OrderRootType.SOURCES, library, pathToJar)) { return true; } if (hasUserPaths(JavadocOrderRootType.getInstance(), library, pathToJar)) { return true; } return false; }