Map<File, Lookup> allProjects = retrievedModels.getEvaluatedProjectsModel();
List<NbJavaModule> result = new ArrayList<>(allProjects.size());
for (Lookup projectInfo: allProjects.values()) {
JavaCompatibilityModel versions = projectInfo.lookup(JavaCompatibilityModel.class);
JavaSourcesModel sourcesModel = projectInfo.lookup(JavaSourcesModel.class);
if (versions == null || sourcesModel == null) {
continue;
}
if (sourcesModel.getSourceSets().isEmpty()) {
LOGGER.log(Level.INFO,
"Disabling the Java extension because there are no sources: {0}",
retrievedModels.getMainProjectDir());
continue;
}