setRootText(STR_LOADING);
rootNode = new TopNode(STR_TOPNAME);
treeModel = new DefaultTreeModel(rootNode);
BundleRepositoryService obr = getOBR();
if(obr != null) {
if(bReload) {
obrErr = "";
try {
assertRepoURLs(obr.getRepositoryURLs());
obr.setRepositoryURLs(obr.getRepositoryURLs());
} catch (Exception e) {
obrErr =
"<b>" + e.getClass().getName() + "</b>"+
"<pre>\n" +
e.getMessage() +
"</pre>";
}
}
int count = obr.getBundleRecordCount();
// String (category) -> Set (BundleRecord)
Map categories = new TreeMap(new Comparator() {
public int compare(Object o1, Object o2) {
return o1.toString().compareToIgnoreCase(o2.toString());
}
});
// move all bundle records into a sorted
// category map of sets
for(int i = 0; i < count; i++) {
BundleRecord br = obr.getBundleRecord(i);
String loc = (String)br.getAttribute(BundleRecord.BUNDLE_UPDATELOCATION);
String category = "other";
if(sortCategory == SORT_CATEGORY) {