diff --git a/src/org/ntlab/traceDebugger/CallTreeModel.java b/src/org/ntlab/traceDebugger/CallTreeModel.java index 82e1af9..ee2a1ff 100644 --- a/src/org/ntlab/traceDebugger/CallTreeModel.java +++ b/src/org/ntlab/traceDebugger/CallTreeModel.java @@ -9,6 +9,8 @@ public class CallTreeModel { private MethodExecution methodExecution; private boolean isHighlighting; + private CallTreeModel parent; + private List children = new ArrayList<>(); public CallTreeModel(MethodExecution methodExecution) { this.methodExecution = methodExecution; @@ -51,12 +53,28 @@ this.isHighlighting = isHighlighting; } +// public List getChildren() { +// List children = methodExecution.getChildren(); +// List childrenCallTreeModels = new ArrayList<>(); +// for (MethodExecution child : children) { +// childrenCallTreeModels.add(new CallTreeModel(child)); +// } +// return childrenCallTreeModels; +// } + + public CallTreeModel getParent() { + return parent; + } + public List getChildren() { - List children = methodExecution.getChildren(); - List childrenCallTreeModels = new ArrayList<>(); - for (MethodExecution child : children) { - childrenCallTreeModels.add(new CallTreeModel(child)); - } - return childrenCallTreeModels; + return children; + } + + public void setParent(CallTreeModel parent) { + this.parent = parent; + } + + public void addChildren(CallTreeModel child) { + this.children.add(child); } }