@Override public Iterable<ProjectProvider> call() throws Exception { List<ProjectProvider> result = new ArrayList<>(); for (ProjectProvider buildSystemType : buildSystems) { ProjectType projectType = type.getValue(); if (projectType != null) { if (projectType.isEnabled(uiContext) && isProjectTypeBuildable(projectType, buildSystemType)) result.add(buildSystemType); } else result.add(buildSystemType); } Collections.sort(result, (left, right) -> left.priority() - right.priority()); return result; } });