diff --git a/org.ntlab.reverseDebugger/src/org/ntlab/reversedebugger/CallStackLabelProvider.java b/org.ntlab.reverseDebugger/src/org/ntlab/reversedebugger/CallStackLabelProvider.java index ce4190e..de53070 100644 --- a/org.ntlab.reverseDebugger/src/org/ntlab/reversedebugger/CallStackLabelProvider.java +++ b/org.ntlab.reverseDebugger/src/org/ntlab/reversedebugger/CallStackLabelProvider.java @@ -16,29 +16,27 @@ import com.sun.jdi.ThreadReference; public class CallStackLabelProvider extends LabelProvider { - + @Override public String getText(Object element) { if (element instanceof TreeNode) { Object value = ((TreeNode)element).getValue(); if (value instanceof MethodCaller) { MethodCaller mc = (MethodCaller)value; - ObjectReference obj = mc.getObj(); - try { - if (obj instanceof ThreadReference) { - return "ThreadID: " + mc.getThreadId(); - } else if (obj != null) { - return ((StringReference)mc.callInstanceMethod("getSignature")).value(); - } - } catch (InvalidTypeException | ClassNotLoadedException - | InvocationException | IncompatibleThreadStateException e) { - e.printStackTrace(); - } + return "ThreadID: " + mc.getThreadId(); + } + if (value instanceof CallStackModel) { + CallStackModel callStackModel = (CallStackModel)value; + StringBuilder text = new StringBuilder(); + text.append(callStackModel.getSignature()); + text.append(" line: "); + text.append(callStackModel.getCallLineNo()); + return text.toString(); } } return ""; } - + @Override public Image getImage(Object element) { if (element instanceof TreeNode) {