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


Java XDebuggerActions类代码示例

本文整理汇总了Java中com.intellij.xdebugger.impl.actions.XDebuggerActions的典型用法代码示例。如果您正苦于以下问题:Java XDebuggerActions类的具体用法?Java XDebuggerActions怎么用?Java XDebuggerActions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


XDebuggerActions类属于com.intellij.xdebugger.impl.actions包,在下文中一共展示了XDebuggerActions类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createTree

import com.intellij.xdebugger.impl.actions.XDebuggerActions; //导入依赖的package包/类
@NotNull
@Override
public Tree createTree(@NotNull Pair<XValue, String> descriptor) {
  final XDebuggerTree tree = new XDebuggerTree(myProject, myProvider, myPosition, XDebuggerActions.INSPECT_TREE_POPUP_GROUP, myMarkers);
  final XValueNodeImpl root = new XValueNodeImpl(tree, null, descriptor.getSecond(), descriptor.getFirst());
  tree.setRoot(root, true);
  tree.setSelectionRow(0);
  // expand root on load
  tree.expandNodesOnLoad(new Condition<TreeNode>() {
    @Override
    public boolean value(TreeNode node) {
      return node == root;
    }
  });
  return tree;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:XDebuggerTreeCreator.java

示例2: createTree

import com.intellij.xdebugger.impl.actions.XDebuggerActions; //导入依赖的package包/类
@NotNull
@Override
public Tree createTree(@NotNull Pair<XInstanceEvaluator, String> descriptor) {
  final XDebuggerTree tree = new XDebuggerTree(myProject, myProvider, myPosition, XDebuggerActions.INSPECT_TREE_POPUP_GROUP, myMarkers);
  final XValueNodeImpl root = new XValueNodeImpl(tree, null, descriptor.getSecond(),
                                                 new InstanceEvaluatorTreeRootValue(descriptor.getFirst(), descriptor.getSecond()));
  tree.setRoot(root, false);
  Condition<TreeNode> visibleRootCondition = new Condition<TreeNode>() {
    @Override
    public boolean value(TreeNode node) {
      return node.getParent() == root;
    }
  };
  tree.expandNodesOnLoad(visibleRootCondition);
  tree.selectNodeOnLoad(visibleRootCondition);

  return tree;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:XDebuggerInstanceTreeCreator.java

示例3: createToolbar

import com.intellij.xdebugger.impl.actions.XDebuggerActions; //导入依赖的package包/类
private ActionToolbarImpl createToolbar() {
  final DefaultActionGroup framesGroup = new DefaultActionGroup();

  CommonActionsManager actionsManager = CommonActionsManager.getInstance();
  framesGroup.add(actionsManager.createPrevOccurenceAction(getFramesList()));
  framesGroup.add(actionsManager.createNextOccurenceAction(getFramesList()));

  framesGroup.addAll(ActionManager.getInstance().getAction(XDebuggerActions.FRAMES_TOP_TOOLBAR_GROUP));

  final ActionToolbarImpl toolbar =
    (ActionToolbarImpl)ActionManager.getInstance().createActionToolbar(ActionPlaces.DEBUGGER_TOOLBAR, framesGroup, true);
  toolbar.setReservePlaceAutoPopupIcon(false);
  toolbar.setAddSeparatorFirst(true);
  toolbar.getComponent().setBorder(new EmptyBorder(1, 0, 0, 0));
  return toolbar;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:XFramesView.java

示例4: patchLeftToolbar

import com.intellij.xdebugger.impl.actions.XDebuggerActions; //导入依赖的package包/类
private static void patchLeftToolbar(@NotNull XDebugSession session, @NotNull RunnerLayoutUi ui) {
  DefaultActionGroup newLeftToolbar = new DefaultActionGroup();

  DefaultActionGroup firstGroup = new DefaultActionGroup();
  addActionToGroup(firstGroup, XDebuggerActions.RESUME);
  addActionToGroup(firstGroup, IdeActions.ACTION_STOP_PROGRAM);
  newLeftToolbar.addAll(firstGroup);

  newLeftToolbar.addSeparator();

  Executor executor = PyEduDebugExecutor.getInstance();
  newLeftToolbar.add(new CloseAction(executor, session.getRunContentDescriptor(), session.getProject()));
  //TODO: return proper helpID
  newLeftToolbar.add(new ContextHelpAction(executor.getHelpId()));

  ui.getOptions().setLeftToolbar(newLeftToolbar, ActionPlaces.DEBUGGER_TOOLBAR);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:PyEduDebugRunner.java

示例5: XDebugSessionTab

import com.intellij.xdebugger.impl.actions.XDebuggerActions; //导入依赖的package包/类
private XDebugSessionTab(@Nonnull XDebugSessionImpl session, @Nullable Icon icon, @Nullable ExecutionEnvironment environment) {
  super(session.getProject(), "Debug", session.getSessionName(), GlobalSearchScope.allScope(session.getProject()));

  setSession(session, environment, icon);

  myUi.addContent(createFramesContent(), 0, PlaceInGrid.left, false);
  addVariablesAndWatches(session);

  attachToSession(session);

  DefaultActionGroup focus = new DefaultActionGroup();
  focus.add(ActionManager.getInstance().getAction(XDebuggerActions.FOCUS_ON_BREAKPOINT));
  myUi.getOptions().setAdditionalFocusActions(focus);

  myUi.addListener(new ContentManagerAdapter() {
    @Override
    public void selectionChanged(ContentManagerEvent event) {
      Content content = event.getContent();
      if (mySession != null && content.isSelected() && getWatchesContentId().equals(ViewImpl.ID.get(content))) {
        myRebuildWatchesRunnable.run();
      }
    }
  }, myRunContentDescriptor);

  rebuildViews();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:27,代码来源:XDebugSessionTab.java

示例6: createVariablesContent

import com.intellij.xdebugger.impl.actions.XDebuggerActions; //导入依赖的package包/类
private Content createVariablesContent(@Nonnull XDebugSessionImpl session) {
  XVariablesView variablesView;
  if (myWatchesInVariables) {
    variablesView = myWatchesView = new XWatchesViewImpl(session, myWatchesInVariables);
  }
  else {
    variablesView = new XVariablesView(session);
  }
  registerView(DebuggerContentInfo.VARIABLES_CONTENT, variablesView);
  Content result =
          myUi.createContent(DebuggerContentInfo.VARIABLES_CONTENT, variablesView.getPanel(), XDebuggerBundle.message("debugger.session.tab.variables.title"),
                             AllIcons.Debugger.Value, null);
  result.setCloseable(false);

  ActionGroup group = getCustomizedActionGroup(XDebuggerActions.VARIABLES_TREE_TOOLBAR_GROUP);
  result.setActions(group, ActionPlaces.DEBUGGER_TOOLBAR, variablesView.getTree());
  return result;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:19,代码来源:XDebugSessionTab.java

示例7: createToolbar

import com.intellij.xdebugger.impl.actions.XDebuggerActions; //导入依赖的package包/类
private ActionToolbarImpl createToolbar() {
  final DefaultActionGroup framesGroup = new DefaultActionGroup();

  CommonActionsManager actionsManager = CommonActionsManager.getInstance();
  framesGroup.add(actionsManager.createPrevOccurenceAction(myFramesList));
  framesGroup.add(actionsManager.createNextOccurenceAction(myFramesList));

  framesGroup.addAll(ActionManager.getInstance().getAction(XDebuggerActions.FRAMES_TOP_TOOLBAR_GROUP));

  final ActionToolbarImpl toolbar =
          (ActionToolbarImpl)ActionManager.getInstance().createActionToolbar(ActionPlaces.DEBUGGER_TOOLBAR, framesGroup, true);
  toolbar.setReservePlaceAutoPopupIcon(false);
  toolbar.setAddSeparatorFirst(true);
  toolbar.getComponent().setBorder(new EmptyBorder(1, 0, 0, 0));
  return toolbar;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:17,代码来源:XFramesView.java

示例8: contextAction

import com.intellij.xdebugger.impl.actions.XDebuggerActions; //导入依赖的package包/类
@Override
public void contextAction() {
  showStatusText(DebuggerBundle.message("status.run.to.cursor"));
  cancelRunToCursorBreakpoint();
  if (myRunToCursorBreakpoint == null) {
    return;
  }
  if (myIgnoreBreakpoints) {
    final BreakpointManager breakpointManager = DebuggerManagerEx.getInstanceEx(myProject).getBreakpointManager();
    breakpointManager.disableBreakpoints(DebugProcessImpl.this);
  }
  applyThreadFilter(getContextThread());
  final SuspendContextImpl context = getSuspendContext();
  myRunToCursorBreakpoint.setSuspendPolicy(context.getSuspendPolicy() == EventRequest.SUSPEND_EVENT_THREAD? DebuggerSettings.SUSPEND_THREAD : DebuggerSettings.SUSPEND_ALL);
  final DebugProcessImpl debugProcess = context.getDebugProcess();
  myRunToCursorBreakpoint.createRequest(debugProcess);
  setRunToCursorBreakpoint(myRunToCursorBreakpoint);

  if (debugProcess.getRequestsManager().getWarning(myRunToCursorBreakpoint) == null) {
    super.contextAction();
  }
  else {
    DebuggerInvocationUtil.swingInvokeLater(myProject, new Runnable() {
      @Override
      public void run() {
        Messages.showErrorDialog(
          DebuggerBundle.message("error.running.to.cursor.no.executable.code",
                                 myRunToCursorBreakpoint.getSourcePosition().getFile().getName(),
                                 myRunToCursorBreakpoint.getLineIndex() + 1),
          UIUtil.removeMnemonic(ActionsBundle.actionText(XDebuggerActions.RUN_TO_CURSOR)));
        DebuggerSession session = debugProcess.getSession();
        session.getContextManager().setState(DebuggerContextUtil.createDebuggerContext(session, context),
                                             DebuggerSession.State.PAUSED, DebuggerSession.Event.CONTEXT, null);
      }
    });
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:38,代码来源:DebugProcessImpl.java

示例9: doSmartStep

import com.intellij.xdebugger.impl.actions.XDebuggerActions; //导入依赖的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

示例10: DebuggerTreePanel

import com.intellij.xdebugger.impl.actions.XDebuggerActions; //导入依赖的package包/类
public DebuggerTreePanel(Project project, DebuggerStateManager stateManager) {
  super(project, stateManager);
  myTree = createTreeView();

  final PopupHandler popupHandler = new PopupHandler() {
    @Override
    public void invokePopup(Component comp, int x, int y) {
      ActionPopupMenu popupMenu = createPopupMenu();
      if (popupMenu != null) {
        myTree.myTipManager.registerPopup(popupMenu.getComponent()).show(comp, x, y);
      }
    }
  };
  myTree.addMouseListener(popupHandler);

  setFocusTraversalPolicy(new IdeFocusTraversalPolicy() {
    @Override
    public Component getDefaultComponentImpl(Container focusCycleRoot) {
      return myTree;
    }
  });

  registerDisposable(new Disposable() {
    @Override
    public void dispose() {
      myTree.removeMouseListener(popupHandler);
    }
  });

  final Shortcut[] shortcuts = KeymapManager.getInstance().getActiveKeymap().getShortcuts("ToggleBookmark");
  final CustomShortcutSet shortcutSet = shortcuts.length > 0? new CustomShortcutSet(shortcuts) : new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_F11, 0));
  overrideShortcut(myTree, XDebuggerActions.MARK_OBJECT, shortcutSet);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:DebuggerTreePanel.java

示例11: runToCursor

import com.intellij.xdebugger.impl.actions.XDebuggerActions; //导入依赖的package包/类
public void runToCursor(@NotNull XSourcePosition position, final boolean ignoreBreakpoints) {
  try {
    DebugProcessImpl.ResumeCommand runToCursorCommand = myDebugProcess.createRunToCursorCommand(getSuspendContext(), position, ignoreBreakpoints);
    setSteppingThrough(runToCursorCommand.getContextThread());
    resumeAction(runToCursorCommand, Event.STEP);
  }
  catch (EvaluateException e) {
    Messages.showErrorDialog(e.getMessage(), UIUtil.removeMnemonic(ActionsBundle.actionText(XDebuggerActions.RUN_TO_CURSOR)));
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:DebuggerSession.java

示例12: createUIComponents

import com.intellij.xdebugger.impl.actions.XDebuggerActions; //导入依赖的package包/类
private void createUIComponents() {
  AnAction action = ActionManager.getInstance().getAction(XDebuggerActions.VIEW_BREAKPOINTS);
  String shortcutText = action != null ? KeymapUtil.getFirstKeyboardShortcutText(action) : null;
  String text = shortcutText != null ? "More (" + shortcutText + ")" : "More";
  myShowMoreOptionsLink = new LinkLabel(text, null, new LinkListener() {
    @Override
    public void linkSelected(LinkLabel aSource, Object aLinkData) {
      if (myDelegate != null) {
        myDelegate.more();
      }
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:BreakpointEditor.java

示例13: registerShortcuts

import com.intellij.xdebugger.impl.actions.XDebuggerActions; //导入依赖的package包/类
private void registerShortcuts() {
  ActionManager actionManager = ActionManager.getInstance();
  actionManager.getAction(XDebuggerActions.SET_VALUE)
    .registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0)), this, this);
  actionManager.getAction(XDebuggerActions.COPY_VALUE).registerCustomShortcutSet(CommonShortcuts.getCopy(), this, this);
  actionManager.getAction(XDebuggerActions.JUMP_TO_SOURCE).registerCustomShortcutSet(CommonShortcuts.getEditSource(), this, this);
  Shortcut[] editTypeShortcuts = KeymapManager.getInstance().getActiveKeymap().getShortcuts(XDebuggerActions.EDIT_TYPE_SOURCE);
  actionManager.getAction(XDebuggerActions.JUMP_TO_TYPE_SOURCE).registerCustomShortcutSet(
    new CustomShortcutSet(editTypeShortcuts), this, this);
  actionManager.getAction(XDebuggerActions.MARK_OBJECT).registerCustomShortcutSet(
    new CustomShortcutSet(KeymapManager.getInstance().getActiveKeymap().getShortcuts("ToggleBookmark")), this, this);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:XDebuggerTree.java

示例14: createVariablesContent

import com.intellij.xdebugger.impl.actions.XDebuggerActions; //导入依赖的package包/类
private Content createVariablesContent(@NotNull XDebugSessionImpl session) {
  final XVariablesView variablesView = new XVariablesView(session);
  myViews.add(variablesView);
  Content result = myUi.createContent(DebuggerContentInfo.VARIABLES_CONTENT, variablesView.getPanel(),
                                      XDebuggerBundle.message("debugger.session.tab.variables.title"),
                                      AllIcons.Debugger.Value, null);
  result.setCloseable(false);

  ActionGroup group = getCustomizedActionGroup(XDebuggerActions.VARIABLES_TREE_TOOLBAR_GROUP);
  result.setActions(group, ActionPlaces.DEBUGGER_TOOLBAR, variablesView.getTree());
  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:XDebugSessionTab.java

示例15: threadAction

import com.intellij.xdebugger.impl.actions.XDebuggerActions; //导入依赖的package包/类
public void threadAction() {
  final DebuggerSession session = myDebuggerContext.getDebuggerSession();
  if (session == null) {
    return;
  }
  final Project project = session.getProject();
  for (final DebuggerTreeNodeImpl node : mySelectedNodes) {
    final NodeDescriptorImpl descriptor = node.getDescriptor();
    try {
      final TextWithImports expression = DebuggerTreeNodeExpression.createEvaluationText(node, myDebuggerContext);
      if (expression != null) {
        DebuggerInvocationUtil.swingInvokeLater(project, new Runnable() {
          public void run() {
            doAddWatch(myWatchPanel, expression, descriptor);
          }
        });
      }
    }
    catch (final EvaluateException e) {
      DebuggerInvocationUtil.swingInvokeLater(project, new Runnable() {
        public void run() {
          Messages.showErrorDialog(project, e.getMessage(), ActionsBundle.actionText(XDebuggerActions.ADD_TO_WATCH));
        }
      });
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:28,代码来源:AddToWatchActionHandler.java


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