public static void traceOrNotTrace(
     final DebugTreeItem dti, final boolean checked, final ArrayList<IErlModule> traceModules) {
   final IErlModule m = (IErlModule) dti.getItem();
   if (checked) {
     traceModules.add(m);
   } else {
     traceModules.remove(m);
   }
 }
 public static void setSubtreeChecked(
     final DebugTreeItem dti,
     final boolean checked,
     final ArrayList<IErlModule> traceModules,
     final CheckboxTreeViewer checkboxTreeViewer) {
   final List<DebugTreeItem> children = dti.getChildren();
   if (children == null || children.size() == 0) {
     traceOrNotTrace(dti, checked, traceModules);
     return;
   }
   for (final DebugTreeItem i : children) {
     checkboxTreeViewer.setChecked(i, checked);
     setSubtreeChecked(i, checked, traceModules, checkboxTreeViewer);
   }
 }