private Set<String> getRoots(List<TreeElement> model) {

    final Set<String> roots = new HashSet<String>(model.size());
    for (final TreeElement tn : model) {
      if (tn.getName() != null) {
        roots.add(tn.getName());
      }
    }

    for (final TreeElement tn : model) {

      for (final TreeElement child : tn.getElements()) {
        if (child.getClazz() != null) {
          roots.remove(child.getClazz());
        }
      }
    }
    return roots;
  }
 private void fillTree(
     final TreeItem parentTi, final String clazz, final Map<String, TreeElement> elementMap) {
   final TreeElement currentElement = elementMap.get(clazz);
   if (currentElement != null) {
     final Set<String> duplicateCheck = new HashSet<String>();
     for (final TreeElement el : currentElement.getElements()) {
       final String clz = el.getClazz();
       if (clz != null && !clz.startsWith("SOAP::") && duplicateCheck.add(clz)) {
         final TreeItem ti = new TreeItem(parentTi, SWT.NONE);
         ti.setText(clz);
         fillTree(ti, clz, elementMap);
       }
     }
   }
 }