本文整理汇总了Java中com.intellij.xdebugger.XDebugProcessStarter类的典型用法代码示例。如果您正苦于以下问题:Java XDebugProcessStarter类的具体用法?Java XDebugProcessStarter怎么用?Java XDebugProcessStarter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XDebugProcessStarter类属于com.intellij.xdebugger包,在下文中一共展示了XDebugProcessStarter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: attachVirtualMachine
import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
@Nullable
protected RunContentDescriptor attachVirtualMachine(final RunProfileState state, final @NotNull ExecutionEnvironment env)
throws ExecutionException
{
return XDebuggerManager.getInstance(env.getProject()).startSession(env, new XDebugProcessStarter()
{
@NotNull
public XDebugProcess start(@NotNull XDebugSession session) throws ExecutionException
{
WeaveRunnerCommandLine weaveRunnerCommandLine = (WeaveRunnerCommandLine) state;
final String weaveFile = weaveRunnerCommandLine.getModel().getWeaveFile();
final Project project = weaveRunnerCommandLine.getEnvironment().getProject();
final VirtualFile projectFile = project.getBaseDir();
final String path = project.getBasePath();
final String relativePath = weaveFile.substring(path.length());
final VirtualFile fileByRelativePath = projectFile.findFileByRelativePath(relativePath);
final DebuggerClient localhost = new DebuggerClient(new WeaveDebuggerClientListener(session, fileByRelativePath), new TcpClientDebuggerProtocol("localhost", 6565));
final ExecutionResult result = state.execute(env.getExecutor(), WeaveDebuggerRunner.this);
new DebuggerConnector(localhost).start();
return new WeaveDebugProcess(session, localhost, result);
}
}).getRunContentDescriptor();
}
示例2: createSession
import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
protected XDebugSession createSession(@NotNull RunProfileState state, @NotNull final ExecutionEnvironment environment)
throws ExecutionException {
FileDocumentManager.getInstance().saveAllDocuments();
final PythonCommandLineState pyState = (PythonCommandLineState)state;
final ServerSocket serverSocket = PythonCommandLineState.createServerSocket();
final int serverLocalPort = serverSocket.getLocalPort();
RunProfile profile = environment.getRunProfile();
final ExecutionResult result =
pyState.execute(environment.getExecutor(), createCommandLinePatchers(environment.getProject(), pyState, profile, serverLocalPort));
return XDebuggerManager.getInstance(environment.getProject()).
startSession(environment, new XDebugProcessStarter() {
@Override
@NotNull
public XDebugProcess start(@NotNull final XDebugSession session) {
PyDebugProcess pyDebugProcess =
createDebugProcess(session, serverSocket, result, pyState);
createConsoleCommunicationAndSetupActions(environment.getProject(), result, pyDebugProcess, session);
return pyDebugProcess;
}
});
}
示例3: createContentDescriptor
import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
protected RunContentDescriptor createContentDescriptor(final RunProfileState runProfileState, final ExecutionEnvironment environment) throws ExecutionException {
final XDebugSession debugSession =
XDebuggerManager.getInstance(environment.getProject()).startSession(environment, new XDebugProcessStarter() {
@NotNull
public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException {
ACTIVE.set(Boolean.TRUE);
try {
final XsltCommandLineState c = (XsltCommandLineState)runProfileState;
final ExecutionResult result = runProfileState.execute(environment.getExecutor(), XsltDebuggerRunner.this);
return new XsltDebugProcess(session, result, c.getExtensionData().getUserData(XsltDebuggerExtension.VERSION));
} finally {
ACTIVE.remove();
}
}
});
return debugSession.getRunContentDescriptor();
}
示例4: createDebugProcessStarter
import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
@NotNull
private XDebugProcessStarter createDebugProcessStarter(@NotNull final TheRXProcessHandler processHandler,
@NotNull final ExecutionConsole executionConsole,
@NotNull final TheRDebugger debugger,
@NotNull final TheROutputReceiver outputReceiver,
@NotNull final TheRResolvingSession resolvingSession) {
return new XDebugProcessStarter() {
@NotNull
@Override
public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException {
return new TheRDebugProcess(
session,
processHandler,
executionConsole,
debugger,
outputReceiver,
resolvingSession,
ConcurrencyUtil.newSingleThreadExecutor(EXECUTOR_NAME)
);
}
};
}
示例5: createContentDescriptor
import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
protected RunContentDescriptor createContentDescriptor(Project project,
final RunProfileState runProfileState,
RunContentDescriptor contentToReuse,
final ExecutionEnvironment executionEnvironment) throws ExecutionException {
final XDebugSession debugSession =
XDebuggerManager.getInstance(project).startSession(this, executionEnvironment, contentToReuse, new XDebugProcessStarter() {
@NotNull
public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException {
ACTIVE.set(Boolean.TRUE);
try {
final XsltCommandLineState c = (XsltCommandLineState)runProfileState;
final ExecutionResult result = runProfileState.execute(executionEnvironment.getExecutor(), XsltDebuggerRunner.this);
return new XsltDebugProcess(session, result, c.getExtensionData().getUserData(XsltDebuggerExtension.VERSION));
} finally {
ACTIVE.remove();
}
}
});
return debugSession.getRunContentDescriptor();
}
示例6: getProcessStarter
import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
private XDebugProcessStarter getProcessStarter(final RunProfileState runProfileState, final ExecutionEnvironment
executionEnvironment) throws ExecutionException {
int port = getAvailablePort();
((XQueryRunProfileState) runProfileState).setPort(port);
return new XDebugProcessStarter() {
@NotNull
public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException {
final ExecutionResult result = runProfileState.execute(executionEnvironment.getExecutor(), XQueryDebuggerRunner.this);
XQueryDebugProcess.XQueryDebuggerIde debuggerIde = new XQueryDebugProcess.XQueryDebuggerIde(session, result.getProcessHandler());
final DBGpIde dbgpIde = ide().withPort(port).withDebuggerIde(debuggerIde).build();
dbgpIde.startListening();
result.getProcessHandler().addProcessListener(new ProcessAdapter() {
@Override
public void processTerminated(ProcessEvent event) {
dbgpIde.stopListening();
}
});
return new XQueryDebugProcess(session, result, dbgpIde);
}
};
}
示例7: createContentDescriptor
import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
protected RunContentDescriptor createContentDescriptor(final RunProfileState runProfileState, final ExecutionEnvironment executionEnvironment) throws ExecutionException
{
Project project = executionEnvironment.getProject();
final XDebugSession debugSession = XDebuggerManager.getInstance(project).startSession(executionEnvironment, new XDebugProcessStarter()
{
@Override
@NotNull
public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException
{
ACTIVE.set(Boolean.TRUE);
try
{
final XsltCommandLineState c = (XsltCommandLineState) runProfileState;
final ExecutionResult result = runProfileState.execute(executionEnvironment.getExecutor(), XsltDebuggerRunner.this);
return new XsltDebugProcess(session, result, c.getExtensionData().getUserData(XsltDebuggerExtension.VERSION));
}
finally
{
ACTIVE.remove();
}
}
});
return debugSession.getRunContentDescriptor();
}
示例8: attachVirtualMachine
import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
@Nullable
public RunContentDescriptor attachVirtualMachine(DebugUIEnvironment environment) throws ExecutionException {
final DebugEnvironment modelEnvironment = environment.getEnvironment();
final DebuggerSession debuggerSession = DebuggerManagerEx.getInstanceEx(myProject).attachVirtualMachine(modelEnvironment);
if (debuggerSession == null) {
return null;
}
final DebugProcessImpl debugProcess = debuggerSession.getProcess();
if (debugProcess.isDetached() || debugProcess.isDetaching()) {
debuggerSession.dispose();
return null;
}
if (modelEnvironment.isRemote()) {
// optimization: that way BatchEvaluator will not try to lookup the class file in remote VM
// which is an expensive operation when executed first time
debugProcess.putUserData(BatchEvaluator.REMOTE_SESSION_KEY, Boolean.TRUE);
}
XDebugSession debugSession =
XDebuggerManager.getInstance(myProject).startSessionAndShowTab(modelEnvironment.getSessionName(), environment.getReuseContent(), new XDebugProcessStarter() {
@Override
@NotNull
public XDebugProcess start(@NotNull XDebugSession session) {
return JavaDebugProcess.create(session, debuggerSession);
}
});
return debugSession.getRunContentDescriptor();
}
示例9: attachVirtualMachine
import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
@Nullable
protected RunContentDescriptor attachVirtualMachine(RunProfileState state,
@NotNull ExecutionEnvironment env,
RemoteConnection connection,
boolean pollConnection) throws ExecutionException {
DebugEnvironment environment = new DefaultDebugEnvironment(env, state, connection, pollConnection);
final DebuggerSession debuggerSession = DebuggerManagerEx.getInstanceEx(env.getProject()).attachVirtualMachine(environment);
if (debuggerSession == null) {
return null;
}
final DebugProcessImpl debugProcess = debuggerSession.getProcess();
if (debugProcess.isDetached() || debugProcess.isDetaching()) {
debuggerSession.dispose();
return null;
}
if (environment.isRemote()) {
// optimization: that way BatchEvaluator will not try to lookup the class file in remote VM
// which is an expensive operation when executed first time
debugProcess.putUserData(BatchEvaluator.REMOTE_SESSION_KEY, Boolean.TRUE);
}
return XDebuggerManager.getInstance(env.getProject()).startSession(env, new XDebugProcessStarter() {
@Override
@NotNull
public XDebugProcess start(@NotNull XDebugSession session) {
XDebugSessionImpl sessionImpl = (XDebugSessionImpl)session;
ExecutionResult executionResult = debugProcess.getExecutionResult();
sessionImpl.addExtraActions(executionResult.getActions());
if (executionResult instanceof DefaultExecutionResult) {
sessionImpl.addRestartActions(((DefaultExecutionResult)executionResult).getRestartActions());
sessionImpl.addExtraStopActions(((DefaultExecutionResult)executionResult).getAdditionalStopActions());
}
return JavaDebugProcess.create(session, debuggerSession);
}
}).getRunContentDescriptor();
}
示例10: attachVirtualMachine
import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
protected DebuggerSession attachVirtualMachine(RunProfileState state,
ExecutionEnvironment environment,
RemoteConnection remoteConnection,
boolean pollConnection) throws ExecutionException {
final DebuggerSession debuggerSession =
DebuggerManagerEx.getInstanceEx(myProject).attachVirtualMachine(new DefaultDebugEnvironment(environment, state, remoteConnection, pollConnection));
XDebuggerManager.getInstance(myProject).startSession(environment, new XDebugProcessStarter() {
@Override
@NotNull
public XDebugProcess start(@NotNull XDebugSession session) {
return JavaDebugProcess.create(session, debuggerSession);
}
});
return debuggerSession;
}
示例11: doExecute
import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
@Nullable
@Override
protected RunContentDescriptor doExecute(@NotNull RunProfileState state, @NotNull final ExecutionEnvironment environment) throws ExecutionException {
RunContentDescriptor r = super.doExecute(state, environment);
XDebuggerManager xDebuggerManager = XDebuggerManager.getInstance(environment.getProject());
return xDebuggerManager.startSession(environment, new XDebugProcessStarter() {
@NotNull
@Override
public XDebugProcess start(@NotNull XDebugSession session) throws ExecutionException {
return new SquirrelDebugProcess(session, environment, r);
}
}).getRunContentDescriptor();
}
示例12: attachVirtualMachine
import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
@Nullable
protected RunContentDescriptor attachVirtualMachine(RunProfileState state,
@NotNull ExecutionEnvironment env,
RemoteConnection connection,
boolean pollConnection) throws ExecutionException {
DebugEnvironment environment = new DefaultDebugUIEnvironment(env, state, connection, pollConnection).getEnvironment();
final DebuggerSession debuggerSession = DebuggerManagerEx.getInstanceEx(env.getProject()).attachVirtualMachine(environment);
if (debuggerSession == null) {
return null;
}
final DebugProcessImpl debugProcess = debuggerSession.getProcess();
if (debugProcess.isDetached() || debugProcess.isDetaching()) {
debuggerSession.dispose();
return null;
}
// optimization: that way BatchEvaluator will not try to lookup the class file in remote VM
// which is an expensive operation when executed first time
debugProcess.putUserData(BatchEvaluator.REMOTE_SESSION_KEY, Boolean.TRUE);
return XDebuggerManager.getInstance(env.getProject()).startSession(env, new XDebugProcessStarter() {
@Override
@NotNull
public XDebugProcess start(@NotNull XDebugSession session) {
XDebugSessionImpl sessionImpl = (XDebugSessionImpl)session;
ExecutionResult executionResult = debugProcess.getExecutionResult();
sessionImpl.addExtraActions(executionResult.getActions());
if (executionResult instanceof DefaultExecutionResult) {
sessionImpl.addRestartActions(((DefaultExecutionResult)executionResult).getRestartActions());
sessionImpl.addExtraStopActions(((DefaultExecutionResult)executionResult).getAdditionalStopActions());
}
return JavaDebugProcess.create(session, debuggerSession);
}
}).getRunContentDescriptor();
}
示例13: getDescriptor
import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
public static RunContentDescriptor getDescriptor(final Module module,
ExecutionEnvironment env,
String urlToLaunch,
String flexSdkName) throws ExecutionException {
final Sdk flexSdk = FlexSdkUtils.findFlexOrFlexmojosSdk(flexSdkName);
if (flexSdk == null) {
throw new ExecutionException(HaxeBundle.message("flex.sdk.not.found", flexSdkName));
}
final FlexBuildConfiguration bc = new FakeFlexBuildConfiguration(flexSdk, urlToLaunch);
final XDebugSession debugSession =
XDebuggerManager.getInstance(module.getProject()).startSession(env, new XDebugProcessStarter() {
@NotNull
public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException {
try {
final FlashRunnerParameters params = new FlashRunnerParameters();
params.setModuleName(module.getName());
return new HaxeDebugProcess(session, bc, params);
}
catch (IOException e) {
throw new ExecutionException(e.getMessage(), e);
}
}
});
return debugSession.getRunContentDescriptor();
}
示例14: getNMEDescriptor
import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
public static RunContentDescriptor getNMEDescriptor(final HaxeDebugRunner runner,
final Module module,
final ExecutionEnvironment env,
final Executor executor, String flexSdkName) throws ExecutionException {
final Sdk flexSdk = FlexSdkUtils.findFlexOrFlexmojosSdk(flexSdkName);
if (flexSdk == null) {
throw new ExecutionException(HaxeBundle.message("flex.sdk.not.found", flexSdkName));
}
final FlexBuildConfiguration bc = new FakeFlexBuildConfiguration(flexSdk, null);
final XDebugSession debugSession =
XDebuggerManager.getInstance(module.getProject()).startSession(env, new XDebugProcessStarter() {
@NotNull
public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException {
try {
NMERunningState runningState = new NMERunningState(env, module, false, true);
final ExecutionResult executionResult = runningState.execute(executor, runner);
final BCBasedRunnerParameters params = new BCBasedRunnerParameters();
params.setModuleName(module.getName());
return new HaxeDebugProcess(session, bc, params);
}
catch (IOException e) {
throw new ExecutionException(e.getMessage(), e);
}
}
});
return debugSession.getRunContentDescriptor();
}
示例15: getOpenFLDescriptor
import com.intellij.xdebugger.XDebugProcessStarter; //导入依赖的package包/类
public static RunContentDescriptor getOpenFLDescriptor(final HaxeDebugRunner runner,
final Module module,
final ExecutionEnvironment env,
final Executor executor, String flexSdkName) throws ExecutionException {
final Sdk flexSdk = FlexSdkUtils.findFlexOrFlexmojosSdk(flexSdkName);
if (flexSdk == null) {
throw new ExecutionException(HaxeBundle.message("flex.sdk.not.found", flexSdkName));
}
final FlexBuildConfiguration bc = new FakeFlexBuildConfiguration(flexSdk, null);
final XDebugSession debugSession =
XDebuggerManager.getInstance(module.getProject()).startSession(env, new XDebugProcessStarter() {
@NotNull
public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException {
try {
OpenFLRunningState runningState = new OpenFLRunningState(env, module, true, true);
final ExecutionResult executionResult = runningState.execute(executor, runner);
final BCBasedRunnerParameters params = new BCBasedRunnerParameters();
params.setModuleName(module.getName());
return new HaxeDebugProcess(session, bc, params);
}
catch (IOException e) {
throw new ExecutionException(e.getMessage(), e);
}
}
});
return debugSession.getRunContentDescriptor();
}