Search in sources :

Example 1 with StackFrameDescriptorImpl

use of com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl in project intellij-community by JetBrains.

the class JavaExecutionStack method createStackFrame.

private static XStackFrame createStackFrame(@NotNull StackFrameProxyImpl stackFrameProxy, @NotNull MethodsTracker tracker) {
    StackFrameDescriptorImpl descriptor = new StackFrameDescriptorImpl(stackFrameProxy, tracker);
    DebugProcessImpl debugProcess = (DebugProcessImpl) descriptor.getDebugProcess();
    Location location = descriptor.getLocation();
    if (location != null) {
        XStackFrame customFrame = debugProcess.getPositionManager().createStackFrame(stackFrameProxy, debugProcess, location);
        if (customFrame != null) {
            return customFrame;
        }
    }
    return new JavaStackFrame(descriptor, true);
}
Also used : StackFrameDescriptorImpl(com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl) XStackFrame(com.intellij.xdebugger.frame.XStackFrame) Location(com.sun.jdi.Location)

Example 2 with StackFrameDescriptorImpl

use of com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl in project intellij-community by JetBrains.

the class ThreadsPanel method selectFrame.

private void selectFrame(DebuggerTreeNodeImpl node) {
    StackFrameProxyImpl frame = ((StackFrameDescriptorImpl) node.getDescriptor()).getFrameProxy();
    DebuggerContextUtil.setStackFrame(getContextManager(), frame);
}
Also used : StackFrameProxyImpl(com.intellij.debugger.jdi.StackFrameProxyImpl) StackFrameDescriptorImpl(com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl)

Example 3 with StackFrameDescriptorImpl

use of com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl in project intellij-community by JetBrains.

the class GotoFrameSourceAction method doAction.

protected static void doAction(DataContext dataContext) {
    final Project project = CommonDataKeys.PROJECT.getData(dataContext);
    if (project == null)
        return;
    StackFrameDescriptorImpl stackFrameDescriptor = getStackFrameDescriptor(dataContext);
    if (stackFrameDescriptor != null) {
        //DebuggerContextUtil.setStackFrame(getContextManager(dataContext), stackFrameDescriptor.getFrameProxy());
        SourcePosition sourcePosition = stackFrameDescriptor.getSourcePosition();
        if (sourcePosition != null) {
            sourcePosition.navigate(true);
        }
    }
}
Also used : Project(com.intellij.openapi.project.Project) StackFrameDescriptorImpl(com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl) SourcePosition(com.intellij.debugger.SourcePosition)

Example 4 with StackFrameDescriptorImpl

use of com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl in project intellij-community by JetBrains.

the class PopFrameAction method isAtBreakpoint.

private static boolean isAtBreakpoint(AnActionEvent e) {
    DebuggerTreeNodeImpl selectedNode = getSelectedNode(e.getDataContext());
    if (selectedNode != null && selectedNode.getDescriptor() instanceof StackFrameDescriptorImpl) {
        DebuggerTreeNodeImpl parent = selectedNode.getParent();
        if (parent != null) {
            return ((ThreadDescriptorImpl) parent.getDescriptor()).isAtBreakpoint();
        }
    }
    DebuggerContextImpl debuggerContext = DebuggerAction.getDebuggerContext(e.getDataContext());
    SuspendContextImpl suspendContext = debuggerContext.getSuspendContext();
    return suspendContext != null && debuggerContext.getThreadProxy() == suspendContext.getThread();
}
Also used : DebuggerTreeNodeImpl(com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl) StackFrameDescriptorImpl(com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl) ThreadDescriptorImpl(com.intellij.debugger.ui.impl.watch.ThreadDescriptorImpl) SuspendContextImpl(com.intellij.debugger.engine.SuspendContextImpl) DebuggerContextImpl(com.intellij.debugger.impl.DebuggerContextImpl)

Aggregations

StackFrameDescriptorImpl (com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl)4 SourcePosition (com.intellij.debugger.SourcePosition)1 SuspendContextImpl (com.intellij.debugger.engine.SuspendContextImpl)1 DebuggerContextImpl (com.intellij.debugger.impl.DebuggerContextImpl)1 StackFrameProxyImpl (com.intellij.debugger.jdi.StackFrameProxyImpl)1 DebuggerTreeNodeImpl (com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl)1 ThreadDescriptorImpl (com.intellij.debugger.ui.impl.watch.ThreadDescriptorImpl)1 Project (com.intellij.openapi.project.Project)1 XStackFrame (com.intellij.xdebugger.frame.XStackFrame)1 Location (com.sun.jdi.Location)1