本文整理了Java中com.intellij.xdebugger.XDebugSession.getRunProfile()
方法的一些代码示例,展示了XDebugSession.getRunProfile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XDebugSession.getRunProfile()
方法的具体详情如下:
包路径:com.intellij.xdebugger.XDebugSession
类名称: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);
}
}
内容来源于网络,如有侵权,请联系作者删除!