gpt4 book ai didi

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

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

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

XDebugSession.getRunProfile介绍

暂无

代码示例

代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin

@Nullable
private VirtualFile findFile() {
 String url = myLocation.file;
 VirtualFile file = LocalFileSystem.getInstance().findFileByPath(url);
 if (file == null && SystemInfo.isWindows) {
  Project project = myProcess.getSession().getProject();
  RunProfile profile = myProcess.getSession().getRunProfile();
  Module module = profile instanceof ModuleBasedConfiguration ? ((ModuleBasedConfiguration)profile).getConfigurationModule().getModule() : null;
  String sdkHomePath = GoSdkService.getInstance(project).getSdkHomePath(module);
  if (sdkHomePath == null) return null;
  String newUrl = StringUtil.replaceIgnoreCase(url, "c:/go", sdkHomePath);
  return LocalFileSystem.getInstance().findFileByPath(newUrl);
 }
 return file;
}

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

@VisibleForTesting
boolean notStoppedAndHasRunProfile(XDebugSession session) {
 return !session.isStopped() && session.getRunProfile() != null;
}

代码示例来源: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

@NotNull
 private XDebugSession createMockSession(boolean isStopped, RunProfile runProfile) {
  XDebugSession debugSession = mock(XDebugSession.class);
  when(debugSession.isStopped()).thenReturn(isStopped);
  if (runProfile != null) {
   when(debugSession.getRunProfile()).thenReturn(runProfile);
  }
  return debugSession;
 }
}

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

@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);
 }
}

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