protected void updateModel(IProgressMonitor monitor) throws CoreException {
    IPluginBase plugin = model.getPluginBase();
    IPluginModelFactory factory = model.getPluginFactory();

    IHQServer server =
        getBooleanOption(KEY_USE_FILTERS_NAME) ? getWithFilters() : getWithoutFilters();

    if (fParent != null && fParent instanceof PluginParentNode) {
      PluginParentNode parent = (PluginParentNode) fParent;
      parent.add(server);
    } else {
      plugin.add(server);
    }
  }
  protected void updateModel(IProgressMonitor monitor) throws CoreException {
    IPluginBase plugin = model.getPluginBase();
    IPluginModelFactory factory = model.getPluginFactory();

    String sigarArg = getStringOption(KEY_SIGAR_ARG_NAME);

    IPluginElement metrics = factory.createElement(plugin);
    //		IHQMetrics metrics = factory.createMetrics();
    metrics.setName("metrics");
    metrics.setAttribute("name", "multi-process-metrics");

    IPluginElement metric = factory.createElement(metrics);
    metric.setName("metric");
    metric.setAttribute("name", "Availability");
    metric.setAttribute("template", "sigar:Type=MultiProcCpu,Arg=%" + sigarArg + "%:Availability");
    metric.setAttribute("category", "AVAILABILITY");
    metric.setAttribute("indicator", "true");
    metric.setAttribute("units", "percentage");
    metric.setAttribute("collectionType", "dynamic");
    metrics.add(metric);

    metric = factory.createElement(metrics);
    metric.setName("metric");
    metric.setAttribute("name", "Number of Processes");
    metric.setAttribute("alias", "NumProcesses");
    metric.setAttribute("template", "sigar:Type=MultiProcCpu,Arg=%" + sigarArg + "%:Processes");
    metric.setAttribute("category", "UTILIZATION");
    metric.setAttribute("units", "none");
    metric.setAttribute("collectionType", "dynamic");
    metrics.add(metric);

    metric = factory.createElement(metrics);
    metric.setName("metric");
    metric.setAttribute("name", "Memory Size");
    metric.setAttribute("alias", "MemSize");
    metric.setAttribute("template", "sigar:Type=MultiProcMem,Arg=%" + sigarArg + "%:Size");
    metric.setAttribute("category", "UTILIZATION");
    metric.setAttribute("units", "B");
    metric.setAttribute("collectionType", "dynamic");
    metrics.add(metric);

    metric = factory.createElement(metrics);
    metric.setName("metric");
    metric.setAttribute("name", "Resident Memory Size");
    metric.setAttribute("alias", "ResidentMemSize");
    metric.setAttribute("template", "sigar:Type=MultiProcMem,Arg=%" + sigarArg + "%:Resident");
    metric.setAttribute("category", "UTILIZATION");
    metric.setAttribute("units", "B");
    metric.setAttribute("collectionType", "dynamic");
    metrics.add(metric);

    metric = factory.createElement(metrics);
    metric.setName("metric");
    metric.setAttribute("name", "Cpu System Time");
    metric.setAttribute("alias", "SystemTime");
    metric.setAttribute("template", "sigar:Type=MultiProcCpu,Arg=%" + sigarArg + "%:Sys");
    metric.setAttribute("category", "UTILIZATION");
    metric.setAttribute("units", "ms");
    metric.setAttribute("collectionType", "trendsup");
    metrics.add(metric);

    metric = factory.createElement(metrics);
    metric.setName("metric");
    metric.setAttribute("name", "Cpu User Time");
    metric.setAttribute("alias", "UserTime");
    metric.setAttribute("template", "sigar:Type=MultiProcCpu,Arg=%" + sigarArg + "%:User");
    metric.setAttribute("category", "UTILIZATION");
    metric.setAttribute("units", "ms");
    metric.setAttribute("collectionType", "trendsup");
    metrics.add(metric);

    metric = factory.createElement(metrics);
    metric.setName("metric");
    metric.setAttribute("name", "Cpu Total Time");
    metric.setAttribute("alias", "TotalTime");
    metric.setAttribute("template", "sigar:Type=MultiProcCpu,Arg=%" + sigarArg + "%:Total");
    metric.setAttribute("category", "UTILIZATION");
    metric.setAttribute("units", "ms");
    metric.setAttribute("collectionType", "trendsup");
    metrics.add(metric);

    metric = factory.createElement(metrics);
    metric.setName("metric");
    metric.setAttribute("name", "Cpu Usage");
    metric.setAttribute("alias", "Usage");
    metric.setAttribute("template", "sigar:Type=MultiProcCpu,Arg=%" + sigarArg + "%:Percent");
    metric.setAttribute("category", "UTILIZATION");
    metric.setAttribute("indicator", "true");
    metric.setAttribute("units", "percentage");
    metric.setAttribute("collectionType", "dynamic");
    metrics.add(metric);

    // we need to know the parent tag where
    // to place these metrics.
    if (fParent != null && fParent instanceof PluginParentNode) {
      PluginParentNode parent = (PluginParentNode) fParent;
      parent.add(metrics);
    } else {
      plugin.add(metrics);
    }
  }