From b98233f0febc45d4fda11fd34f44bcc1315aa863 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Fri, 16 Oct 2015 12:13:00 +0200 Subject: [PATCH] pass value to computeSourcePosition --- .../src/org/jetbrains/debugger/BasicDebuggerViewSupport.kt | 4 ---- .../src/org/jetbrains/debugger/DebuggerViewSupport.kt | 3 ++- .../debugger-ui/src/org/jetbrains/debugger/VariableView.kt | 2 +- .../src/org/jetbrains/debugger/frame/ExecutionStackImpl.java | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/BasicDebuggerViewSupport.kt b/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/BasicDebuggerViewSupport.kt index 4cf4a1993583..49914ea7b238 100644 --- a/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/BasicDebuggerViewSupport.kt +++ b/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/BasicDebuggerViewSupport.kt @@ -18,7 +18,6 @@ package org.jetbrains.debugger import com.intellij.xdebugger.evaluation.XDebuggerEvaluator -import com.intellij.xdebugger.frame.XNavigatable import com.intellij.xdebugger.frame.XValueNode import org.jetbrains.concurrency.Promise import org.jetbrains.debugger.frame.CallFrameView @@ -41,9 +40,6 @@ open class BasicDebuggerViewSupport : MemberFilter, DebuggerViewSupport { throw UnsupportedOperationException() } - override fun computeSourcePosition(name: String, variable: Variable, context: VariableContext, navigatable: XNavigatable) { - } - override fun getMemberFilter(context: VariableContext): Promise { return defaultMemberFilterPromise } diff --git a/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/DebuggerViewSupport.kt b/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/DebuggerViewSupport.kt index 26c9b2084874..dd363fbe0811 100644 --- a/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/DebuggerViewSupport.kt +++ b/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/DebuggerViewSupport.kt @@ -51,7 +51,8 @@ interface DebuggerViewSupport { */ fun canNavigateToSource(variable: Variable, context: VariableContext) = false - fun computeSourcePosition(name: String, variable: Variable, context: VariableContext, navigatable: XNavigatable) + fun computeSourcePosition(name: String, value: Value?, variable: Variable, context: VariableContext, navigatable: XNavigatable) { + } fun computeInlineDebuggerData(name: String, variable: Variable, context: VariableContext, callback: XInlineDebuggerDataCallback) = ThreeState.UNSURE diff --git a/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/VariableView.kt b/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/VariableView.kt index 63c70b1c6005..9ec9e0114651 100644 --- a/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/VariableView.kt +++ b/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/VariableView.kt @@ -366,7 +366,7 @@ class VariableView(name: String, private val variable: Variable, private val con } } else { - viewSupport.computeSourcePosition(name, variable, context, navigatable) + viewSupport.computeSourcePosition(name, value!!, variable, context, navigatable) } } diff --git a/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/frame/ExecutionStackImpl.java b/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/frame/ExecutionStackImpl.java index 43030ab764d9..6e4c1a871a12 100644 --- a/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/frame/ExecutionStackImpl.java +++ b/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/frame/ExecutionStackImpl.java @@ -50,7 +50,7 @@ class ExecutionStackImpl extends XExecutionStack { } @Override - public void computeStackFrames(final int firstFrameIndex, final XStackFrameContainer container) { + public final void computeStackFrames(final int firstFrameIndex, final XStackFrameContainer container) { SuspendContext suspendContext = debugProcess.getVm().getSuspendContextManager().getContext(); // WipSuspendContextManager set context to null on resume _before_ vm.getDebugListener().resumed() call() (in any case, XFramesView can queue event to EDT), so, IDE state could be outdated compare to VM (our) state if (suspendContext == null) {