当前位置: 首页>>代码示例>>Java>>正文


Java DebuggerSession.stepInto方法代码示例

本文整理汇总了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;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:28,代码来源:JvmSmartStepIntoHandler.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:45,代码来源:JvmSmartStepIntoHandler.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:JvmSmartStepIntoActionHandler.java

示例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);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:11,代码来源:JvmSmartStepIntoActionHandler.java

示例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);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:7,代码来源:StepIntoActionHandler.java

示例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);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:7,代码来源:ForceStepIntoActionHandler.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:56,代码来源:JvmSmartStepIntoHandler.java


注:本文中的com.intellij.debugger.impl.DebuggerSession.stepInto方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。