diff --git a/java/debugger/impl/src/com/intellij/debugger/engine/JavaStackFrame.java b/java/debugger/impl/src/com/intellij/debugger/engine/JavaStackFrame.java index ee38a02e720b..ccb812326202 100644 --- a/java/debugger/impl/src/com/intellij/debugger/engine/JavaStackFrame.java +++ b/java/debugger/impl/src/com/intellij/debugger/engine/JavaStackFrame.java @@ -159,7 +159,6 @@ public class JavaStackFrame extends XStackFrame implements JVMStackFrameInfoProv protected XNamedValue createThisNode(EvaluationContextImpl evaluationContext) { ObjectReference thisObjectReference = myDescriptor.getThisObject(); if (thisObjectReference != null) { - myDescriptor.putUserData(BreakpointIntentionAction.THIS_TYPE_KEY, thisObjectReference.type().name()); return JavaValue.create(myNodeManager.getThisDescriptor(null, thisObjectReference), evaluationContext, myNodeManager); } return null; diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointIntentionAction.kt b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointIntentionAction.kt index 9288ec2facf7..79b7d343bf56 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointIntentionAction.kt +++ b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointIntentionAction.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.debugger.ui.breakpoints import com.intellij.debugger.InstanceFilter @@ -131,6 +131,9 @@ internal abstract class BreakpointIntentionAction(protected val myBreakpoint: XB @JvmField val THIS_TYPE_KEY = Key.create("THIS_TYPE_KEY") + @JvmField + val THIS_ID_KEY = Key.create("THIS_ID_KEY") + @JvmStatic fun getIntentions(breakpoint: XBreakpoint<*>, currentSession: XDebugSession?): List { val process = currentSession?.debugProcess @@ -146,7 +149,7 @@ internal abstract class BreakpointIntentionAction(protected val myBreakpoint: XB res.add(AddClassNotFilter(breakpoint, it)) } - frameDescriptor.thisObject?.uniqueID()?.let { + frameDescriptor.getUserData(THIS_ID_KEY)?.let { res.add(AddInstanceFilter(breakpoint, it)) } diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/StackFrameDescriptorImpl.java b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/StackFrameDescriptorImpl.java index 8e2da4fb6583..9d424fe7334b 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/StackFrameDescriptorImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/StackFrameDescriptorImpl.java @@ -8,6 +8,7 @@ import com.intellij.debugger.engine.evaluation.EvaluationContextImpl; import com.intellij.debugger.impl.DebuggerUtilsEx; import com.intellij.debugger.jdi.StackFrameProxyImpl; import com.intellij.debugger.settings.ThreadsViewSettings; +import com.intellij.debugger.ui.breakpoints.BreakpointIntentionAction; import com.intellij.debugger.ui.tree.StackFrameDescriptor; import com.intellij.debugger.ui.tree.render.DescriptorLabelListener; import com.intellij.icons.AllIcons; @@ -222,6 +223,10 @@ public class StackFrameDescriptorImpl extends NodeDescriptorImpl implements Stac } catch (EvaluateException e) { LOG.info(e); } + if (myThisObject != null) { + putUserData(BreakpointIntentionAction.THIS_ID_KEY, myThisObject.uniqueID()); + putUserData(BreakpointIntentionAction.THIS_TYPE_KEY, myThisObject.type().name()); + } } return myThisObject; }