+
+ /* calculating top node */
+ TmfStatisticsTreeNode topNode = this;
+ while (topNode.getParent() != null && topNode.getParent().getParent() != null) {
+ topNode = topNode.getParent();
+ }
+ fTopNode = topNode;
+ }
+
+ /**
+ * Get the name for this node. It's used as the key in the parent's node.
+ *
+ * @return Name of this node.
+ */
+ public String getName() {
+ if (fPath.length == 0) {
+ /* This means we are the root node, which has no path itself */
+ return "root"; //$NON-NLS-1$
+ }
+ return fPath[fPath.length - 1];