private void populate() {
    List<IModule> modules = collectModules();
    {
      ModulePoolNamespaceBuilder builder = new ModulePoolNamespaceBuilder();
      TextTreeNode solutions = new TextTreeNode("Solutions");
      for (IModule s : modules) {
        if (s instanceof Solution || s instanceof ProjectStructureModule) {
          builder.addNode(ProjectModuleTreeNode.createFor(myProject, s, true));
        }
      }
      builder.fillNode(solutions);
      add(solutions);
    }

    {
      ModulePoolNamespaceBuilder builder = new ModulePoolNamespaceBuilder();
      TextTreeNode languages = new TextTreeNode("Languages");
      for (Language l : CollectionUtil.filter(Language.class, modules)) {
        builder.addNode(ProjectModuleTreeNode.createFor(myProject, l, true));
      }
      builder.fillNode(languages);
      add(languages);
    }

    {
      ModulePoolNamespaceBuilder builder = new ModulePoolNamespaceBuilder();
      TextTreeNode devkits = new TextTreeNode("DevKits");
      for (DevKit devKit : CollectionUtil.filter(DevKit.class, modules)) {
        builder.addNode(ProjectModuleTreeNode.createFor(myProject, devKit, true));
      }
      builder.fillNode(devkits);
      add(devkits);
    }
  }
    protected String getNamespace(ProjectModuleTreeNode node) {
      if (node.getModule() instanceof Generator) {
        Generator generator = (Generator) node.getModule();
        return NameUtil.namespaceFromLongName(generator.getSourceLanguage().getModuleFqName());
      }

      return NameUtil.namespaceFromLongName(node.getModule().getModuleFqName());
    }