• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java XBreakpointManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: init

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
public void init(Project project, XBreakpointManager breakpointManager, @NotNull B breakpoint, @Nullable XDebuggerEditorsProvider debuggerEditorsProvider) {
  init(project, breakpointManager, breakpoint);
  if (debuggerEditorsProvider != null) {
    ActionListener listener = new ActionListener() {
      public void actionPerformed(final ActionEvent e) {
        onCheckboxChanged();
      }
    };
    myLogExpressionComboBox = new XDebuggerExpressionComboBox(project, debuggerEditorsProvider, LOG_EXPRESSION_HISTORY_ID, myBreakpoint.getSourcePosition());
    JComponent logExpressionComponent = myLogExpressionComboBox.getComponent();
    myLogExpressionPanel.add(logExpressionComponent, BorderLayout.CENTER);
    myLogExpressionComboBox.setEnabled(false);
    myTemporaryCheckBox.setVisible(breakpoint instanceof XLineBreakpoint);
    myLogExpressionCheckBox.addActionListener(listener);
    DebuggerUIUtil.focusEditorOnCheck(myLogExpressionCheckBox, myLogExpressionComboBox.getEditorComponent());
  }
  else {
    myExpressionPanel.getParent().remove(myExpressionPanel);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:XBreakpointActionsPanel.java


示例2: testXDebugger

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
public void testXDebugger() throws Exception {
  final WorkingContextManager manager = getContextManager();
  final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(getProject()).getBreakpointManager();

  final XsltBreakpointType type = XBreakpointType.EXTENSION_POINT_NAME.findExtension(XsltBreakpointType.class);

  ApplicationManager.getApplication().runWriteAction(new Runnable() {
    public void run() {
      XLineBreakpointImpl<XBreakpointProperties> breakpoint =
        (XLineBreakpointImpl<XBreakpointProperties>)breakpointManager.addLineBreakpoint(type, "foo", 0, null);

      final String name = "foo";
      manager.saveContext(name, null);
      breakpointManager.removeBreakpoint(breakpoint);
    }
  });
  manager.loadContext("foo");
  Collection<? extends XLineBreakpoint<XBreakpointProperties>> breakpoints = breakpointManager.getBreakpoints(type);
  assertEquals(1, breakpoints.size());
  manager.clearContext();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:ContextTest.java


示例3: DoUpdateIdeWithBreakpoint

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
public DoUpdateIdeWithBreakpoint(
    XBreakpointManager manager,
    VirtualFile file,
    int line,
    CloudLineBreakpointProperties properties,
    Breakpoint serverBreakpoint,
    Map<String, XBreakpoint> ideBreakpoints,
    CloudDebugProcess debugProcess) {
  this.manager = manager;
  this.file = file;
  this.line = line;
  this.properties = properties;
  this.serverBreakpoint = serverBreakpoint;
  this.ideBreakpoints = ideBreakpoints;
  this.debugProcess = debugProcess;
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:17,代码来源:DoUpdateIdeWithBreakpoint.java


示例4: stop

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
@Override
public void stop() {
  getStateController().stopBackgroundListening();

  RunProfile profile = getXDebugSession().getRunProfile();
  if (profile instanceof CloudDebugRunConfiguration) {
    ((CloudDebugRunConfiguration) profile).setProcessState(processState);
  }

  getRepositoryValidator().restoreToOriginalState(getXDebugSession().getProject());

  XBreakpointManager breakpointManager =
      XDebuggerManager.getInstance(getXDebugSession().getProject()).getBreakpointManager();
  for (XBreakpoint bp : breakpointManager.getAllBreakpoints()) {
    com.intellij.debugger.ui.breakpoints.Breakpoint cloudBreakpoint =
        BreakpointManager.getJavaBreakpoint(bp);
    if (!(cloudBreakpoint instanceof CloudLineBreakpointType.CloudLineBreakpoint)) {
      continue;
    }
    CloudLineBreakpointType.CloudLineBreakpoint cloudLineBreakpoint =
        (CloudLineBreakpointType.CloudLineBreakpoint) cloudBreakpoint;
    cloudLineBreakpoint.setVerified(false);
    cloudLineBreakpoint.setErrorMessage(null);
    updateBreakpointPresentation(cloudLineBreakpoint);
  }
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:27,代码来源:CloudDebugProcess.java


示例5: testUpdateBreakpointRepresentationUsesBreakpointErrorMsgAndIcon

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
public void testUpdateBreakpointRepresentationUsesBreakpointErrorMsgAndIcon() throws Exception {
  XBreakpointManager breakpointManager = mock(XBreakpointManager.class);
  CloudDebugProcess cloudDebugProcess =
      mockCloudDebugProcess(breakpointManager, mock(XDebugSession.class));

  CloudLineBreakpoint breakpoint =
      mockCloudLineBreakpoint("mock error message", mock(XLineBreakpointImpl.class));
  XLineBreakpoint xBreakpoint = mock(XLineBreakpoint.class);
  when(breakpoint.getXBreakpoint()).thenReturn(xBreakpoint);
  Icon icon = mock(Icon.class);
  when(breakpoint.getSetIcon(anyBoolean())).thenReturn(icon);
  cloudDebugProcess.updateBreakpointPresentation(breakpoint);

  verify(breakpoint).getXBreakpoint();
  verify(breakpoint).getSetIcon(Matchers.anyBoolean());
  verify(breakpoint).getErrorMessage();
  verify(breakpointManager).updateBreakpointPresentation(xBreakpoint, icon, "mock error message");
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:19,代码来源:CloudDebugProcessTest.java


示例6: perform

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
public void perform(@NotNull final Project project, final AnActionEvent event) {
  XSourcePosition position = XDebuggerUtilImpl.getCaretPosition(project, event.getDataContext());
  if (position == null) return;

  ExpandRegionAction.expandRegionAtCaret(project, event.getData(PlatformDataKeys.EDITOR));

  int line = position.getLine();
  VirtualFile file = position.getFile();
  final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(project).getBreakpointManager();
  for (XLineBreakpointType<?> type : XDebuggerUtil.getInstance().getLineBreakpointTypes()) {
    final XLineBreakpoint<? extends XBreakpointProperties> breakpoint = breakpointManager.findBreakpointAtLine(type, file, line);
    if (breakpoint != null && myTemporary && !breakpoint.isTemporary()) {
      breakpoint.setTemporary(true);
    } else if (type.canPutAt(file, line, project) || breakpoint != null) {
      XDebuggerUtil.getInstance().toggleLineBreakpoint(project, type, file, line, myTemporary);
      return;
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:20,代码来源:XToggleLineBreakpointActionHandler.java


示例7: init

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
public void init(Project project, XBreakpointManager breakpointManager, @NotNull B breakpoint, @Nullable XDebuggerEditorsProvider debuggerEditorsProvider) {
  init(project, breakpointManager, breakpoint);
  if (debuggerEditorsProvider != null) {
    ActionListener listener = new ActionListener() {
      public void actionPerformed(final ActionEvent e) {
        onCheckboxChanged();
      }
    };

    myLogExpressionComboBox = new XDebuggerExpressionComboBox(project, debuggerEditorsProvider, "breakpointLogExpression", myBreakpoint.getSourcePosition());
    JComponent logExpressionComponent = myLogExpressionComboBox.getComponent();
    myLogExpressionPanel.add(logExpressionComponent, BorderLayout.CENTER);
    myLogExpressionComboBox.setEnabled(false);
    myTemporaryCheckBox.setVisible(breakpoint instanceof XLineBreakpoint);
    myLogExpressionCheckBox.addActionListener(listener);
    DebuggerUIUtil.focusEditorOnCheck(myLogExpressionCheckBox, logExpressionComponent);
  }
  else {
    myLogExpressionCheckBox.setVisible(false);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:22,代码来源:XBreakpointActionsPanel.java


示例8: init

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
public void init(Project project, final XBreakpointManager breakpointManager, @NotNull B breakpoint) {
  super.init(project, breakpointManager, breakpoint);
  mySuspendRadioButtons = new HashMap<SuspendPolicy, JRadioButton>();
  mySuspendRadioButtons.put(SuspendPolicy.ALL, mySuspendAllRadioButton);
  mySuspendRadioButtons.put(SuspendPolicy.THREAD, mySuspendThreadRadioButton);
  mySuspendRadioButtons.put(SuspendPolicy.NONE, mySuspendNoneRadioButton);
  @NonNls String card = myBreakpointType.isSuspendThreadSupported() ? "radioButtons" : "checkbox";
  ((CardLayout)mySuspendPolicyPanel.getLayout()).show(mySuspendPolicyPanel, card);

  mySuspendCheckBox.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent actionEvent) {
      if (myDelegate != null && !mySuspendCheckBox.isSelected()) {
        myDelegate.showMoreOptionsIfNeeded();
      }
    }
  });
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:XSuspendPolicyPanel.java


示例9: testXDebugger

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
public void testXDebugger() throws Exception {
  final WorkingContextManager manager = getContextManager();
  final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(getProject()).getBreakpointManager();

  ApplicationManager.getApplication().runWriteAction(new Runnable() {
    public void run() {
      XLineBreakpointImpl<XBreakpointProperties> breakpoint =
        (XLineBreakpointImpl<XBreakpointProperties>)breakpointManager.addLineBreakpoint(new XsltBreakpointType(), "foo", 0, null);

      final String name = "foo";
      manager.saveContext(name, null);
      breakpointManager.removeBreakpoint(breakpoint);
    }
  });
  manager.loadContext("foo");
  XBreakpoint<?>[] breakpoints = breakpointManager.getAllBreakpoints();
  assertEquals(1, breakpoints.length);
  manager.clearContext();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:20,代码来源:ContextTest.java


示例10: testXDebugger

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
public void testXDebugger() throws Exception {
  final WorkingContextManager manager = getContextManager();
  final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(getProject()).getBreakpointManager();

  ApplicationManager.getApplication().runWriteAction(new Runnable() {
    public void run() {
      XLineBreakpointImpl<TestBreakpointProperties> breakpoint =
        (XLineBreakpointImpl<TestBreakpointProperties>)breakpointManager.addLineBreakpoint(new TestBreakpointType(), "foo", 0, null);

      final String name = "foo";
      manager.saveContext(name, null);
      breakpointManager.removeBreakpoint(breakpoint);
    }
  });
  manager.loadContext("foo");
  XBreakpoint<?>[] breakpoints = breakpointManager.getAllBreakpoints();
  assertEquals(1, breakpoints.length);
  manager.clearContext();
}
 
开发者ID:consulo,项目名称:consulo-tasks,代码行数:20,代码来源:ContextTest.java


示例11: initComponent

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
@Override
public void initComponent()
{
	XBreakpointManager breakpointManager = XDebuggerManager.getInstance(myProject).getBreakpointManager();

	breakpointManager.addBreakpointListener(DotNetMethodBreakpointType.getInstance(), new XBreakpointListener<XLineBreakpoint<DotNetMethodBreakpointProperties>>()
	{
		@Override
		public void breakpointAdded(@NotNull XLineBreakpoint<DotNetMethodBreakpointProperties> breakpoint)
		{
			XDebugSessionImpl.NOTIFICATION_GROUP.createNotification("Method breakpoints may dramatically slow down debugging", MessageType.WARNING).notify((myProject));
		}
	});
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:15,代码来源:DotNetBreakpointListenerComponent.java


示例12: isEnabled

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
@Override
public boolean isEnabled(@Nonnull final Project project, final AnActionEvent event) {
  XLineBreakpointType<?>[] breakpointTypes = XDebuggerUtil.getInstance().getLineBreakpointTypes();
  final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(project).getBreakpointManager();
  for (XSourcePosition position : XDebuggerUtilImpl.getAllCaretsPositions(project, event.getDataContext())) {
    for (XLineBreakpointType<?> breakpointType : breakpointTypes) {
      final VirtualFile file = position.getFile();
      final int line = position.getLine();
      if (XLineBreakpointResolverTypeExtension.INSTANCE.resolveBreakpointType(project, file, line) != null ||
          breakpointManager.findBreakpointAtLine(breakpointType, file, line) != null) {
        return true;
      }
    }
  }
  return false;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:17,代码来源:XToggleLineBreakpointActionHandler.java


示例13: init

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
public void init(Project project, XBreakpointManager breakpointManager, @Nonnull XBreakpointBase breakpoint, @Nullable XDebuggerEditorsProvider debuggerEditorsProvider) {
  init(project, breakpointManager, breakpoint);
  if (debuggerEditorsProvider != null) {
    ActionListener listener = new ActionListener() {
      public void actionPerformed(final ActionEvent e) {
        onCheckboxChanged();
      }
    };
    myLogExpressionComboBox = new XDebuggerExpressionComboBox(project, debuggerEditorsProvider, LOG_EXPRESSION_HISTORY_ID, myBreakpoint.getSourcePosition(), true);
    JComponent logExpressionComponent = myLogExpressionComboBox.getComponent();
    myLogExpressionPanel.add(logExpressionComponent, BorderLayout.CENTER);
    myLogExpressionComboBox.setEnabled(false);
    myTemporaryCheckBox.setVisible(breakpoint instanceof XLineBreakpoint);
    myLogExpressionCheckBox.addActionListener(listener);
    DebuggerUIUtil.focusEditorOnCheck(myLogExpressionCheckBox, myLogExpressionComboBox.getEditorComponent());
  }
  else {
    myExpressionPanel.getParent().remove(myExpressionPanel);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:21,代码来源:XBreakpointActionsPanel.java


示例14: updateGutter

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
private void updateGutter() {
  if (myVisible) {
    if (isValid()) {
      final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(myProject).getBreakpointManager();
      breakpointManager.updateBreakpointPresentation((XLineBreakpoint)myXBreakpoint, getIcon(), myInvalidMessage);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:BreakpointWithHighlighter.java


示例15: isEnabled

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
public boolean isEnabled(@NotNull final Project project, final AnActionEvent event) {
  XLineBreakpointType<?>[] breakpointTypes = XDebuggerUtil.getInstance().getLineBreakpointTypes();
  final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(project).getBreakpointManager();
  for (XSourcePosition position : XDebuggerUtilImpl.getAllCaretsPositions(project, event.getDataContext())) {
    for (XLineBreakpointType<?> breakpointType : breakpointTypes) {
      final VirtualFile file = position.getFile();
      final int line = position.getLine();
      if (breakpointType.canPutAt(file, line, project) || breakpointManager.findBreakpointAtLine(breakpointType, file, line) != null) {
        return true;
      }
    }
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:XToggleLineBreakpointActionHandler.java


示例16: init

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
@Override
public void init(Project project, XBreakpointManager breakpointManager, @NotNull B breakpoint) {
  super.init(project, breakpointManager, breakpoint);
  myDependentBreakpointManager = ((XBreakpointManagerImpl)breakpointManager).getDependentBreakpointManager();
  myMasterBreakpointChooser = new BreakpointChooser(project, new BreakpointChooser.Delegate() {
    @Override
    public void breakpointChosen(Project project, BreakpointItem breakpointItem) {
      updateAfterBreakpointHitPanel();
    }
  }, null, getBreakpointItemsExceptMy());

  myMasterBreakpointComboBoxPanel.add(myMasterBreakpointChooser.getComponent(), BorderLayout.CENTER);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:XMasterBreakpointPanel.java


示例17: updateBreakpointPresentation

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
void updateBreakpointPresentation(CloudLineBreakpoint cloudLineBreakpoint) {
  final XBreakpointManager manager =
      XDebuggerManager.getInstance(getXDebugSession().getProject()).getBreakpointManager();
  manager.updateBreakpointPresentation(
      (XLineBreakpoint<?>) cloudLineBreakpoint.getXBreakpoint(),
      cloudLineBreakpoint.getSetIcon(areBreakpointsMuted()),
      cloudLineBreakpoint.getErrorMessage());
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:9,代码来源:CloudDebugProcess.java


示例18: verifyMutedIconSettingInUpdateBreakpointPresentation

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
private void verifyMutedIconSettingInUpdateBreakpointPresentation(Boolean muted) {
  XBreakpointManager breakpointManager = mock(XBreakpointManager.class);
  XDebugSession debugSession = mock(XDebugSession.class);
  when(debugSession.areBreakpointsMuted()).thenReturn(muted);
  CloudDebugProcess cloudDebugProcess = mockCloudDebugProcess(breakpointManager, debugSession);

  CloudLineBreakpoint breakpoint =
      mockCloudLineBreakpoint("mock error message", mock(XLineBreakpointImpl.class));
  cloudDebugProcess.updateBreakpointPresentation(breakpoint);

  verify(breakpoint).getSetIcon(muted);
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:13,代码来源:CloudDebugProcessTest.java


示例19: mockCloudDebugProcess

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
@NotNull
private CloudDebugProcess mockCloudDebugProcess(
    XBreakpointManager breakpointManager, XDebugSession debugSession) {
  Project project = mock(Project.class);
  when(debugSession.getProject()).thenReturn(project);
  XDebuggerManager debuggerManager = mock(XDebuggerManager.class);
  when(project.getComponent(XDebuggerManager.class)).thenReturn(debuggerManager);
  when(debuggerManager.getBreakpointManager()).thenReturn(breakpointManager);
  return new CloudDebugProcess(debugSession);
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:11,代码来源:CloudDebugProcessTest.java


示例20: isEnabled

import com.intellij.xdebugger.breakpoints.XBreakpointManager; //导入依赖的package包/类
public boolean isEnabled(@NotNull final Project project, final AnActionEvent event) {
  XSourcePosition position = XDebuggerUtilImpl.getCaretPosition(project, event.getDataContext());
  if (position == null) return false;

  XLineBreakpointType<?>[] breakpointTypes = XDebuggerUtil.getInstance().getLineBreakpointTypes();
  final XBreakpointManager breakpointManager = XDebuggerManager.getInstance(project).getBreakpointManager();
  for (XLineBreakpointType<?> breakpointType : breakpointTypes) {
    final VirtualFile file = position.getFile();
    final int line = position.getLine();
    if (breakpointType.canPutAt(file, line, project) || breakpointManager.findBreakpointAtLine(breakpointType, file, line) != null) {
      return true;
    }
  }
  return false;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:16,代码来源:XToggleLineBreakpointActionHandler.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LifecycleListener类代码示例发布时间:2022-05-23
下一篇:
Java DTDGrammar类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap