}
}
}
this.modules = Collections.mapFromStringTo();
HTMLCollection opts = (list).getOptions();
int m = opts.length();
if (m == 0) {
m = modules.size();
for (int i = 0; i < m; i++) {
list.appendChild(createOption(modules.get(i), i == 0));
}
} else {
// There are modules, let's merge
MapFromStringTo<Node> existing = Collections.mapFromStringTo();
for (int i = 0; i < m; i++) {
Node opt = opts.item(i);
Node attr = opt.getAttributes().getNamedItem("value");
if (attr != null)
existing.put(attr.getNodeValue(), opt);
}
m = modules.size();