static LegacyGWTHostPageSelectionTreeItem[] buildTree(Map<String,Set<String>> modulesHostPages){
  List<LegacyGWTHostPageSelectionTreeItem> treeItems=new ArrayList<LegacyGWTHostPageSelectionTreeItem>();
  for (  String moduleName : modulesHostPages.keySet()) {
    LegacyGWTHostPageSelectionTreeItem moduleItem=new LegacyGWTHostPageSelectionTreeItem(Path.fromPortableString(moduleName.replace('.','/')));
    treeItems.add(moduleItem);
    for (    String hostPage : modulesHostPages.get(moduleName)) {
      new LegacyGWTHostPageSelectionTreeItem(Path.fromPortableString(hostPage),moduleItem);
    }
  }
  return treeItems.toArray(new LegacyGWTHostPageSelectionTreeItem[0]);
}

static LegacyGWTHostPageSelectionTreeItem [ ] buildTree ( Map < String , Set < String > > modulesHostPages ) { List < LegacyGWTHostPageSelectionTreeItem > treeItems = new ArrayList < LegacyGWTHostPageSelectionTreeItem > ( ) ; for ( String moduleName : modulesHostPages . keySet ( ) ) { LegacyGWTHostPageSelectionTreeItem moduleItem = new LegacyGWTHostPageSelectionTreeItem ( Path . fromPortableString ( moduleName . replace ( '.' , '/' ) ) ) ; treeItems . add ( moduleItem ) ; for ( String hostPage : modulesHostPages . get ( moduleName ) ) { new LegacyGWTHostPageSelectionTreeItem ( Path . fromPortableString ( hostPage ) , moduleItem ) ; } } return treeItems . toArray ( new LegacyGWTHostPageSelectionTreeItem [ 0 ] ) ; }
builds the tree nodes for a set of modules and host pages .
