runtimeTree.removeItems();
runtimeTree.setVisible(true);
if(subsystems.isEmpty()) return;
final GroupItem platformGroup = new GroupItem("Platform");
platformGroup.addItem(new LHSNavTreeItem("JVM", NameTokens.VirtualMachine));
platformGroup.addItem(new LHSNavTreeItem("Environment", NameTokens.EnvironmentPresenter));
platformGroup.addItem(new LHSNavTreeItem("Log Viewer", NameTokens.LogViewer));
runtimeTree.addItem(platformGroup);
final GroupItem subsystemGroup = new GroupItem("Subsystems");
// match subsystems
for(SubsystemRecord subsys : subsystems) {
for(Predicate predicate : metricPredicates) {
if(predicate.matches(subsys.getKey()))
subsystemGroup.addItem(predicate.getNavItem());
}
for(Predicate predicate : runtimePredicates) {
if(predicate.matches(subsys.getKey()))
runtimeTree.addItem(predicate.getNavItem());
}
}
runtimeTree.addItem(subsystemGroup);
subsystemGroup.setState(true);
platformGroup.setState(true);
// empty runtime operations
runtimeTree.setVisible(runtimeTree.getItemCount()>0);
serverTree.expandTopLevel();