Пример #1
0
  protected void initContents(Def[] modules) {
    if (modules.length == 0) {
      _modules.add(Widgets.newLabel("No modules in this project?"));
      return;
    }

    // build the module hierarchy
    char modSep = '.'; // TODO
    ModuleNode root = ModuleNode.createTree(modSep, modules);

    // now flatten it into a bunch of links
    if (root.mod != null) {
      addModuleLabels(root, "", modSep, DEF_THRESH); // one nameless top-level module
    } else {
      for (ModuleNode top : root.children) {
        addModuleLabels(top, "", modSep, DEF_THRESH);
      }
    }
  }