Пример #1
0
    public String getText(Object element) {
      String text = "";
      if (element instanceof TagTreeItem) {
        TagTreeItem tti = (TagTreeItem) element;
        text = tti.getName();
        if (isHierarchical()) {
          int dot = text.lastIndexOf('.');
          if (dot > 0 && dot < text.length() - 1) {
            text = text.substring(dot + 1);
          }
        }

        text += "(" + tti.getWaypointCount() + ")";

        if (tti.hasChildren()) {
          text += "+";
        }
      }
      return text;
    }