public JavaStackFrame(@NotNull StackFrameDescriptorImpl descriptor, boolean update) { myDescriptor = descriptor; if (update) { myDescriptor.setContext(null); myDescriptor.updateRepresentation(null, DescriptorLabelListener.DUMMY_LISTENER); } myEqualityObject = update ? NodeManagerImpl.getContextKeyForFrame(myDescriptor.getFrameProxy()) : null; myDebugProcess = ((DebugProcessImpl) descriptor.getDebugProcess()); myNodeManager = myDebugProcess.getXdebugProcess().getNodeManager(); myXSourcePosition = myDescriptor.getSourcePosition() != null ? DebuggerUtilsEx.toXSourcePosition(myDescriptor.getSourcePosition()) : null; }
DebuggerContextImpl getFrameDebuggerContext() { DebuggerManagerThreadImpl.assertIsManagerThread(); DebuggerContextImpl context = myDebugProcess.getDebuggerContext(); if (context.getFrameProxy() != getStackFrameProxy()) { SuspendContextImpl threadSuspendContext = SuspendManagerUtil.getSuspendContextForThread( context.getSuspendContext(), getStackFrameProxy().threadProxy()); context = DebuggerContextImpl.createDebuggerContext( myDebugProcess.mySession, threadSuspendContext, getStackFrameProxy().threadProxy(), getStackFrameProxy()); context.setPositionCache(myDescriptor.getSourcePosition()); context.initCaches(); } return context; }