if(subsystems.isEmpty()) return;
metricLeaf.setVisible(true);
runtimeLeaf.setVisible(true);
final GroupItem platformGroup = new GroupItem("Platform");
platformGroup.addItem(new LHSNavTreeItem("JVM", NameTokens.HostVMMetricPresenter));
platformGroup.addItem(new LHSNavTreeItem("Environment", NameTokens.EnvironmentPresenter));
metricLeaf.addItem(platformGroup);
//platformGroup.setState(true);
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()))
runtimeLeaf.addItem(predicate.getNavItem());
}
}
metricLeaf.addItem(subsystemGroup);
subsystemGroup.setState(true);
platformGroup.setState(true);
// empty runtime operations
runtimeLeaf.setVisible(runtimeLeaf.getChildCount()>0);