Search in sources :

Example 1 with FrameworkGroup

use of com.intellij.framework.FrameworkGroup in project intellij-community by JetBrains.

the class AddSupportForFrameworksPanel method createNodes.

private Collection<FrameworkSupportNodeBase> createNodes(List<FrameworkSupportInModuleProvider> providers, Set<String> associated, final Set<String> preselected) {
    Map<String, FrameworkSupportNode> nodes = new HashMap<>();
    Map<FrameworkGroup<?>, FrameworkGroupNode> groups = new HashMap<>();
    List<FrameworkSupportNodeBase> roots = new ArrayList<>();
    Map<String, FrameworkSupportNodeBase> associatedNodes = new LinkedHashMap<>();
    for (FrameworkSupportInModuleProvider provider : providers) {
        createNode(provider, nodes, groups, roots, providers, associated, associatedNodes);
    }
    FrameworkSupportNodeBase.sortByName(roots, (o1, o2) -> Comparing.compare(preselected.contains(o2.getId()), preselected.contains(o1.getId())));
    myRoots = roots;
    return associatedNodes.values();
}
Also used : FrameworkSupportInModuleProvider(com.intellij.framework.addSupport.FrameworkSupportInModuleProvider) FrameworkGroup(com.intellij.framework.FrameworkGroup)

Aggregations

FrameworkGroup (com.intellij.framework.FrameworkGroup)1 FrameworkSupportInModuleProvider (com.intellij.framework.addSupport.FrameworkSupportInModuleProvider)1