gpt4 book ai didi

com.intellij.xdebugger.XDebuggerManager.getDebugSessions()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 18:00:40 27 4
gpt4 key购买 nike

本文整理了Java中com.intellij.xdebugger.XDebuggerManager.getDebugSessions()方法的一些代码示例,展示了XDebuggerManager.getDebugSessions()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XDebuggerManager.getDebugSessions()方法的具体详情如下:
包路径:com.intellij.xdebugger.XDebuggerManager
类名称:XDebuggerManager
方法名:getDebugSessions

XDebuggerManager.getDebugSessions介绍

暂无

代码示例

代码示例来源:origin: GoogleCloudPlatform/google-cloud-intellij

@NotNull
@VisibleForTesting
Set<RunProfile> getProfilesWithActiveDebugSession(Project project) {
 Set<RunProfile> debuggingProfiles = new HashSet<RunProfile>();
 XDebuggerManager debugManager = XDebuggerManager.getInstance(project);
 for (XDebugSession session : debugManager.getDebugSessions()) {
  if (notStoppedAndHasRunProfile(session)) {
   debuggingProfiles.add(session.getRunProfile());
  }
 }
 return debuggingProfiles;
}

代码示例来源:origin: GoogleCloudPlatform/google-cloud-intellij

private List<CloudDebugProcess> getActiveDebugProcesses(Project project) {

  List<CloudDebugProcess> processes = Lists.newArrayList();

  for (XDebugSession session : XDebuggerManager.getInstance(project).getDebugSessions()) {
   if (session.getDebugProcess() instanceof CloudDebugProcess) {
    processes.add((CloudDebugProcess) session.getDebugProcess());
   }
  }
  return processes;
 }
}

代码示例来源:origin: GoogleCloudPlatform/google-cloud-intellij

void createMockXDebuggerManager(Project project, XDebugSession[] value) {
 XDebuggerManager debuggerManager = mock(XDebuggerManager.class);
 when(debuggerManager.getDebugSessions()).thenReturn(value);
 when(project.getComponent(XDebuggerManager.class)).thenReturn(debuggerManager);
}

代码示例来源:origin: GoogleCloudPlatform/google-cloud-intellij

private Project createProject(
  int inProgressDebugSessions,
  int backgroundListeningDebugsSessions,
  int notListeningDebugSessions) {
 XDebuggerManager debuggerManager = mock(XDebuggerManager.class);
 XDebugSession[] debugSessions = new XDebugSession[inProgressDebugSessions];
 List<RunnerAndConfigurationSettings> allRunnerSettings =
   new ArrayList<RunnerAndConfigurationSettings>();
 for (int i = 0; i < inProgressDebugSessions; i++) {
  XDebugSession debugSession = createInProgressDebugSettings(allRunnerSettings);
  debugSessions[i] = debugSession;
 }
 when(debuggerManager.getDebugSessions()).thenReturn(debugSessions);
 applicationContainer.unregisterComponent(XDebuggerManager.class.getName());
 registerService(XDebuggerManager.class, debuggerManager);
 for (int i = 0; i < backgroundListeningDebugsSessions; i++) {
  createBackgroundListeningDebugSettings(allRunnerSettings);
 }
 for (int i = 0; i < notListeningDebugSessions; i++) {
  createNotListeningNotActiveSettings(allRunnerSettings);
 }
 RunManager runManager = mock(RunManager.class);
 when(runManager.getAllSettings()).thenReturn(allRunnerSettings);
 applicationContainer.unregisterComponent(RunManager.class.getName());
 registerService(RunManager.class, runManager);
 return project;
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com