本文整理了Java中com.intellij.xdebugger.XDebugSession.getCurrentStackFrame()
方法的一些代码示例,展示了XDebugSession.getCurrentStackFrame()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XDebugSession.getCurrentStackFrame()
方法的具体详情如下:
包路径:com.intellij.xdebugger.XDebugSession
类名称: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());
}
});
内容来源于网络,如有侵权,请联系作者删除!