本文整理汇总了Java中com.intellij.debugger.impl.DebuggerSession.stepInto方法的典型用法代码示例。如果您正苦于以下问题:Java DebuggerSession.stepInto方法的具体用法?Java DebuggerSession.stepInto怎么用?Java DebuggerSession.stepInto使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.debugger.impl.DebuggerSession
的用法示例。
在下文中一共展示了DebuggerSession.stepInto方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doSmartStep
import com.intellij.debugger.impl.DebuggerSession; //导入方法依赖的package包/类
/**
* Override this if you haven't PsiMethod, like in Kotlin.
* @param position
* @param session
* @param fileEditor
* @return false to continue for another handler or for default action (step into)
*/
public boolean doSmartStep(SourcePosition position, final DebuggerSession session, TextEditor fileEditor) {
final List<PsiMethod> methods = findReferencedMethods(position);
if (methods.size() > 0) {
if (methods.size() == 1) {
session.stepInto(true, getSmartStepFilter(methods.get(0)));
}
else {
final PsiMethodListPopupStep popupStep = new PsiMethodListPopupStep(methods, new PsiMethodListPopupStep.OnChooseRunnable() {
public void execute(PsiMethod chosenMethod) {
session.stepInto(true, getSmartStepFilter(chosenMethod));
}
});
final ListPopup popup = JBPopupFactory.getInstance().createListPopup(popupStep);
final RelativePoint point = DebuggerUIUtil.calcPopupLocation(((TextEditor)fileEditor).getEditor(), position.getLine());
popup.show(point);
}
return true;
}
return false;
}
示例2: doSmartStep
import com.intellij.debugger.impl.DebuggerSession; //导入方法依赖的package包/类
/**
* Override this if you haven't PsiMethod, like in Kotlin.
* @param position
* @param session
* @param fileEditor
* @return false to continue for another handler or for default action (step into)
*/
public boolean doSmartStep(SourcePosition position, final DebuggerSession session, TextEditor fileEditor) {
final List<SmartStepTarget> targets = findSmartStepTargets(position);
if (!targets.isEmpty()) {
final SmartStepTarget firstTarget = targets.get(0);
if (targets.size() == 1) {
session.sessionResumed();
session.stepInto(true, createMethodFilter(firstTarget));
}
else {
final Editor editor = fileEditor.getEditor();
final PsiMethodListPopupStep popupStep = new PsiMethodListPopupStep(editor, targets, new PsiMethodListPopupStep.OnChooseRunnable() {
public void execute(SmartStepTarget chosenTarget) {
session.sessionResumed();
session.stepInto(true, createMethodFilter(chosenTarget));
}
});
ListPopupImpl popup = new ListPopupImpl(popupStep);
DebuggerUIUtil.registerExtraHandleShortcuts(popup, XDebuggerActions.STEP_INTO);
DebuggerUIUtil.registerExtraHandleShortcuts(popup, XDebuggerActions.SMART_STEP_INTO);
popup.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
popupStep.getScopeHighlighter().dropHighlight();
if (!e.getValueIsAdjusting()) {
final SmartStepTarget selectedTarget = (SmartStepTarget)((JBList)e.getSource()).getSelectedValue();
if (selectedTarget != null) {
highlightTarget(popupStep, selectedTarget);
}
}
}
});
highlightTarget(popupStep, firstTarget);
DebuggerUIUtil.showPopupForEditorLine(popup, editor, position.getLine());
}
return true;
}
return false;
}
示例3: doStep
import com.intellij.debugger.impl.DebuggerSession; //导入方法依赖的package包/类
private static void doStep(final @NotNull Project project, final @Nullable SourcePosition position, final @NotNull DebuggerSession session) {
final VirtualFile file = position != null ? position.getFile().getVirtualFile() : null;
final FileEditor fileEditor = file != null? FileEditorManager.getInstance(project).getSelectedEditor(file) : null;
if (fileEditor instanceof TextEditor) {
for (JvmSmartStepIntoHandler handler : Extensions.getExtensions(JvmSmartStepIntoHandler.EP_NAME)) {
if (handler.isAvailable(position) && handler.doSmartStep(position, session, (TextEditor)fileEditor)) {
return;
}
}
}
session.sessionResumed();
session.stepInto(true, null);
}
示例4: doStep
import com.intellij.debugger.impl.DebuggerSession; //导入方法依赖的package包/类
private static void doStep(final @NotNull Project project, final @Nullable SourcePosition position, final @NotNull DebuggerSession session) {
final VirtualFile file = position != null ? position.getFile().getVirtualFile() : null;
final FileEditor fileEditor = file != null? FileEditorManager.getInstance(project).getSelectedEditor(file) : null;
if (fileEditor instanceof TextEditor) {
for (JvmSmartStepIntoHandler handler : Extensions.getExtensions(JvmSmartStepIntoHandler.EP_NAME)) {
if (handler.isAvailable(position) && handler.doSmartStep(position, session, (TextEditor)fileEditor)) return;
}
}
session.stepInto(true, null);
}
示例5: perform
import com.intellij.debugger.impl.DebuggerSession; //导入方法依赖的package包/类
public void perform(@NotNull final Project project, AnActionEvent e) {
final DebuggerSession session = getSession(project);
if (session != null) {
session.stepInto(false, null);
}
}
示例6: perform
import com.intellij.debugger.impl.DebuggerSession; //导入方法依赖的package包/类
public void perform(@NotNull final Project project, AnActionEvent e) {
final DebuggerSession session = getSession(project);
if (session != null) {
session.stepInto(true, null);
}
}
示例7: doSmartStep
import com.intellij.debugger.impl.DebuggerSession; //导入方法依赖的package包/类
/**
* Override this if you haven't PsiMethod, like in Kotlin.
*
* @param position
* @param session
* @param fileEditor
* @return false to continue for another handler or for default action (step into)
*/
public boolean doSmartStep(SourcePosition position, final DebuggerSession session, TextEditor fileEditor)
{
final List<SmartStepTarget> targets = findSmartStepTargets(position);
if(!targets.isEmpty())
{
final SmartStepTarget firstTarget = targets.get(0);
if(targets.size() == 1)
{
session.sessionResumed();
session.stepInto(true, createMethodFilter(firstTarget));
}
else
{
final Editor editor = fileEditor.getEditor();
final PsiMethodListPopupStep popupStep = new PsiMethodListPopupStep(editor, targets, new PsiMethodListPopupStep.OnChooseRunnable()
{
public void execute(SmartStepTarget chosenTarget)
{
session.sessionResumed();
session.stepInto(true, createMethodFilter(chosenTarget));
}
});
ListPopupImpl popup = new ListPopupImpl(popupStep);
DebuggerUIUtil.registerExtraHandleShortcuts(popup, XDebuggerActions.STEP_INTO);
DebuggerUIUtil.registerExtraHandleShortcuts(popup, XDebuggerActions.SMART_STEP_INTO);
popup.addListSelectionListener(new ListSelectionListener()
{
public void valueChanged(ListSelectionEvent e)
{
popupStep.getScopeHighlighter().dropHighlight();
if(!e.getValueIsAdjusting())
{
final SmartStepTarget selectedTarget = (SmartStepTarget) ((JBList) e.getSource()).getSelectedValue();
if(selectedTarget != null)
{
highlightTarget(popupStep, selectedTarget);
}
}
}
});
highlightTarget(popupStep, firstTarget);
DebuggerUIUtil.showPopupForEditorLine(popup, editor, position.getLine());
}
return true;
}
return false;
}