public static List collectAllModules(Module module, List collectedmodules) {
    { Module child = null;
      edu.isi.powerloom.PlIterator iter000 = edu.isi.powerloom.PLI.getChildModules(module);

      while (iter000.nextP()) {
        child = ((Module)(iter000.value));
        if (!GuiServer.codeModuleP(child)) {
          GuiServer.collectAllModules(child, collectedmodules);
        }
      }
    }
    collectedmodules.insert(module);
    return (collectedmodules);
  }