gpt4 book ai didi

com.intellij.xdebugger.XDebugSession.getCurrentStackFrame()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 19:24:40 27 4
gpt4 key购买 nike

本文整理了Java中com.intellij.xdebugger.XDebugSession.getCurrentStackFrame()方法的一些代码示例,展示了XDebugSession.getCurrentStackFrame()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XDebugSession.getCurrentStackFrame()方法的具体详情如下:
包路径:com.intellij.xdebugger.XDebugSession
类名称:XDebugSession
方法名:getCurrentStackFrame

XDebugSession.getCurrentStackFrame介绍

暂无

代码示例

代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin

@Nullable
 private XSourcePosition findPosition() {
  XDebugSession debugSession = getSession();
  if (debugSession == null) return null;
  XStackFrame stackFrame = debugSession.getCurrentStackFrame();
  if (stackFrame == null) return null;
  Project project = debugSession.getProject();
  XSourcePosition position = debugSession.getCurrentPosition();
  Editor editor = ((FileEditorManagerImpl)FileEditorManager.getInstance(project)).getSelectedTextEditor(true);
  if (editor == null || position == null) return null;
  String name = myName.startsWith("&") ? myName.replaceFirst("\\&", "") : myName;
  PsiElement resolved = findTargetElement(project, position, editor, name);
  if (resolved == null) return null;
  VirtualFile virtualFile = resolved.getContainingFile().getVirtualFile();
  return XDebuggerUtil.getInstance().createPositionByOffset(virtualFile, resolved.getTextOffset());
 }
});

代码示例来源:origin: ballerina-platform/ballerina-lang

@Nullable
  private XSourcePosition findPosition() {
    XDebugSession debugSession = myProcess.getSession();
    if (debugSession == null) {
      return null;
    }
    XStackFrame stackFrame = debugSession.getCurrentStackFrame();
    if (stackFrame == null) {
      return null;
    }
    Project project = debugSession.getProject();
    XSourcePosition position = debugSession.getCurrentPosition();
    Editor editor = ((FileEditorManagerImpl) FileEditorManager.getInstance(project))
        .getSelectedTextEditor(true);
    if (editor == null || position == null) {
      return null;
    }
    String name = myName.startsWith("&") ? myName.replaceFirst("\\&", "") : myName;
    PsiElement resolved = findTargetElement(project, position, editor, name);
    if (resolved == null) {
      return null;
    }
    VirtualFile virtualFile = resolved.getContainingFile().getVirtualFile();
    return XDebuggerUtil.getInstance().createPositionByOffset(virtualFile, resolved.getTextOffset());
  }
});

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com