Java Code Examples for com.intellij.execution.ExecutionResult#getProcessHandler()
The following examples show how to use
com.intellij.execution.ExecutionResult#getProcessHandler() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XQueryDebuggerRunner.java From intellij-xquery with Apache License 2.0 | 6 votes |
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); } }; }
Example 2
Source File: MuleDebugProcess.java From mule-intellij-plugins with Apache License 2.0 | 5 votes |
public MuleDebugProcess(@NotNull final XDebugSession session, @NotNull final MuleDebuggerSession muleDebuggerSession, ExecutionResult result, Map<String, String> modulesToAppsMap) { super(session); this.muleDebuggerSession = muleDebuggerSession; this.muleBreakpointHandler = new MuleBreakpointHandler(muleDebuggerSession, modulesToAppsMap); this.editorProperties = new MuleDebuggerEditorProperties(); this.processHandler = result.getProcessHandler(); this.executionConsole = result.getExecutionConsole(); init(); }
Example 3
Source File: WeaveDebugProcess.java From mule-intellij-plugins with Apache License 2.0 | 5 votes |
protected WeaveDebugProcess(@NotNull XDebugSession session, DebuggerClient debuggerClient, ExecutionResult result) { super(session); this.weaveDebuggerClient = debuggerClient; this.processHandler = result.getProcessHandler(); this.executionConsole = result.getExecutionConsole(); this.breakpointHandler = new WeaveBreakpointHandler(debuggerClient); }
Example 4
Source File: RemoteProcessSupport.java From consulo with Apache License 2.0 | 5 votes |
private void startProcess(Target target, Parameters configuration, Pair<Target, Parameters> key) { ProgramRunner runner = new DefaultProgramRunner() { @Override @Nonnull public String getRunnerId() { return "MyRunner"; } @Override public boolean canRun(@Nonnull String executorId, @Nonnull RunProfile profile) { return true; } }; Executor executor = DefaultRunExecutor.getRunExecutorInstance(); ProcessHandler processHandler = null; try { RunProfileState state = getRunProfileState(target, configuration, executor); ExecutionResult result = state.execute(executor, runner); //noinspection ConstantConditions processHandler = result.getProcessHandler(); } catch (Exception e) { dropProcessInfo(key, e instanceof ExecutionException? e.getMessage() : ExceptionUtil.getUserStackTrace(e, LOG), processHandler); return; } processHandler.addProcessListener(getProcessListener(key)); processHandler.startNotify(); }
Example 5
Source File: XQueryDebugProcess.java From intellij-xquery with Apache License 2.0 | 4 votes |
public XQueryDebugProcess(XDebugSession session, ExecutionResult executionResult, DBGpIde dbgpIde) { super(session); this.dbgpIde = dbgpIde; executionConsole = executionResult.getExecutionConsole(); processHandler = executionResult.getProcessHandler(); }
Example 6
Source File: RunContentDescriptor.java From consulo with Apache License 2.0 | 4 votes |
public RunContentDescriptor(@Nonnull RunProfile profile, @Nonnull ExecutionResult executionResult, @Nonnull RunnerLayoutUi ui) { this(executionResult.getExecutionConsole(), executionResult.getProcessHandler(), ui.getComponent(), profile.getName(), profile.getIcon(), null, executionResult instanceof DefaultExecutionResult ? ((DefaultExecutionResult)executionResult).getRestartActions() : null); myRunnerLayoutUi = ui; }