当前位置: 首页>>代码示例>>Java>>正文


Java ExecutionResult.getProcessHandler方法代码示例

本文整理汇总了Java中com.intellij.execution.ExecutionResult.getProcessHandler方法的典型用法代码示例。如果您正苦于以下问题:Java ExecutionResult.getProcessHandler方法的具体用法?Java ExecutionResult.getProcessHandler怎么用?Java ExecutionResult.getProcessHandler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.execution.ExecutionResult的用法示例。


在下文中一共展示了ExecutionResult.getProcessHandler方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createDebugProcess

import com.intellij.execution.ExecutionResult; //导入方法依赖的package包/类
@NotNull
@Override
protected PyDebugProcess createDebugProcess(@NotNull XDebugSession session,
                                            ServerSocket serverSocket,
                                            ExecutionResult result,
                                            PythonCommandLineState pyState) {
  ExecutionConsole executionConsole = result.getExecutionConsole();
  ProcessHandler processHandler = result.getProcessHandler();
  boolean isMultiProcess = pyState.isMultiprocessDebug();
  String scriptName = getScriptName(pyState);
  if (scriptName != null) {
    VirtualFile file = VfsUtil.findFileByIoFile(new File(scriptName), true);
    if (file != null) {
      int line = getBreakpointLineNumber(file, session.getProject());
      if (line != NO_LINE) {
        return new PyEduDebugProcess(session, serverSocket,
                                     executionConsole, processHandler,
                                     isMultiProcess, scriptName, line + 1);
      }
    }
  }
  LOG.info("Failed to create PyEduDebugProcess. PyDebugProcess created instead.");
  return new PyDebugProcess(session, serverSocket, executionConsole,
                            processHandler, isMultiProcess);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:PyEduDebugRunner.java

示例2: getProcessStarter

import com.intellij.execution.ExecutionResult; //导入方法依赖的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);
        }
    };
}
 
开发者ID:ligasgr,项目名称:intellij-xquery,代码行数:22,代码来源:XQueryDebuggerRunner.java

示例3: MuleDebugProcess

import com.intellij.execution.ExecutionResult; //导入方法依赖的package包/类
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();
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:10,代码来源:MuleDebugProcess.java

示例4: WeaveDebugProcess

import com.intellij.execution.ExecutionResult; //导入方法依赖的package包/类
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);
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:9,代码来源:WeaveDebugProcess.java

示例5: RunContentDescriptor

import com.intellij.execution.ExecutionResult; //导入方法依赖的package包/类
public RunContentDescriptor(@NotNull RunProfile profile, @NotNull ExecutionResult executionResult, @NotNull RunnerLayoutUi ui) {
  this(executionResult.getExecutionConsole(),
       executionResult.getProcessHandler(),
       ui.getComponent(),
       profile.getName(),
       profile.getIcon(),
       null,
       executionResult instanceof DefaultExecutionResult ? ((DefaultExecutionResult)executionResult).getRestartActions() : null);
  myRunnerLayoutUi = ui;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:RunContentDescriptor.java

示例6: startProcess

import com.intellij.execution.ExecutionResult; //导入方法依赖的package包/类
private void startProcess(Target target, Parameters configuration, @NotNull Pair<Target, Parameters> key) {
  ProgramRunner runner = new DefaultProgramRunner() {
    @Override
    @NotNull
    public String getRunnerId() {
      return "MyRunner";
    }

    @Override
    public boolean canRun(@NotNull String executorId, @NotNull RunProfile profile) {
      return true;
    }
  };
  Executor executor = DefaultRunExecutor.getRunExecutorInstance();
  ProcessHandler processHandler;
  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), null);
    return;
  }
  processHandler.addProcessListener(getProcessListener(key));
  processHandler.startNotify();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:RemoteProcessSupport.java

示例7: createDebugProcess

import com.intellij.execution.ExecutionResult; //导入方法依赖的package包/类
@NotNull
protected PyDebugProcess createDebugProcess(@NotNull XDebugSession session,
                                            ServerSocket serverSocket,
                                            ExecutionResult result,
                                            PythonCommandLineState pyState) {
  return new PyDebugProcess(session, serverSocket, result.getExecutionConsole(), result.getProcessHandler(),
                            pyState.isMultiprocessDebug());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:PyDebugRunner.java

示例8: createConsoleCommunicationAndSetupActions

import com.intellij.execution.ExecutionResult; //导入方法依赖的package包/类
public static void createConsoleCommunicationAndSetupActions(@NotNull final Project project,
                                                             @NotNull final ExecutionResult result,
                                                             @NotNull PyDebugProcess debugProcess, @NotNull XDebugSession session) {
  ExecutionConsole console = result.getExecutionConsole();
  if (console instanceof PythonDebugLanguageConsoleView) {
    ProcessHandler processHandler = result.getProcessHandler();

    initDebugConsoleView(project, debugProcess, (PythonDebugLanguageConsoleView)console, processHandler, session);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:PyDebugRunner.java

示例9: XsltDebugProcess

import com.intellij.execution.ExecutionResult; //导入方法依赖的package包/类
public XsltDebugProcess(XDebugSession session, ExecutionResult executionResult, XsltChecker.LanguageLevel data) {
  super(session);
  myProcessHandler = executionResult.getProcessHandler();
  myProcessHandler.putUserData(KEY, this);
  myExecutionConsole = executionResult.getExecutionConsole();
  myEditorsProvider = new XsltDebuggerEditorsProvider(data);
  Disposer.register(myExecutionConsole, this);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:XsltDebugProcess.java

示例10: doExecute

import com.intellij.execution.ExecutionResult; //导入方法依赖的package包/类
@Nullable
@Override
protected RunContentDescriptor doExecute(@NotNull final RunProfileState state, @NotNull final ExecutionEnvironment environment)
  throws ExecutionException {
  FileDocumentManager.getInstance().saveAllDocuments();

  final Project project = environment.getProject();
  final ExecutionResult executionResult = getExecutionResult(state, environment);

  final TheRXProcessHandler processHandler = (TheRXProcessHandler)executionResult.getProcessHandler();
  final TheROutputReceiver outputReceiver = new TheROutputReceiverImpl(processHandler);

  final TheRRunConfiguration runConfiguration = (TheRRunConfiguration)environment.getRunProfile();
  final String scriptPath = runConfiguration.getScriptPath();

  final XDebugSession session = XDebuggerManager.getInstance(project).startSession(
    environment,
    createDebugProcessStarter(
      processHandler,
      executionResult.getExecutionConsole(),
      createDebugger(processHandler, outputReceiver, scriptPath),
      outputReceiver,
      createResolvingSession(
        project,
        getVirtualFile(scriptPath)
      )
    )
  );

  return session.getRunContentDescriptor();
}
 
开发者ID:ktisha,项目名称:TheRPlugin,代码行数:32,代码来源:TheRDebugRunner.java

示例11: startProcess

import com.intellij.execution.ExecutionResult; //导入方法依赖的package包/类
private void startProcess(Target target, Parameters configuration, Pair<Target, Parameters> key) {
  ProgramRunner runner = new DefaultProgramRunner() {
    @Override
    @NotNull
    public String getRunnerId() {
      return "MyRunner";
    }

    @Override
    public boolean canRun(@NotNull String executorId, @NotNull 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();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:29,代码来源:RemoteProcessSupport.java

示例12: startProcess

import com.intellij.execution.ExecutionResult; //导入方法依赖的package包/类
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();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:29,代码来源:RemoteProcessSupport.java

示例13: XQueryDebugProcess

import com.intellij.execution.ExecutionResult; //导入方法依赖的package包/类
public XQueryDebugProcess(XDebugSession session, ExecutionResult executionResult, DBGpIde dbgpIde) {
    super(session);
    this.dbgpIde = dbgpIde;
    executionConsole = executionResult.getExecutionConsole();
    processHandler = executionResult.getProcessHandler();
}
 
开发者ID:ligasgr,项目名称:intellij-xquery,代码行数:7,代码来源:XQueryDebugProcess.java

示例14: RunContentDescriptor

import com.intellij.execution.ExecutionResult; //导入方法依赖的package包/类
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;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:6,代码来源:RunContentDescriptor.java

示例15: doExecute

import com.intellij.execution.ExecutionResult; //导入方法依赖的package包/类
protected RunContentDescriptor doExecute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment env) throws ExecutionException
{
	FileDocumentManager.getInstance().saveAllDocuments();

	ExecutionResult executionResult;
	boolean shouldAddDefaultActions = true;
	if(state instanceof JavaCommandLine)
	{
		final OwnJavaParameters parameters = ((JavaCommandLine) state).getJavaParameters();
		patch(parameters, env.getRunnerSettings(), env.getRunProfile(), true);

		ProcessProxy proxy = ProcessProxyFactory.getInstance().createCommandLineProxy((JavaCommandLine) state);
		executionResult = state.execute(env.getExecutor(), this);
		if(proxy != null)
		{
			ProcessHandler handler = executionResult != null ? executionResult.getProcessHandler() : null;
			if(handler != null)
			{
				proxy.attach(handler);
				handler.addProcessListener(new ProcessAdapter()
				{
					@Override
					public void processTerminated(@NotNull ProcessEvent event)
					{
						proxy.destroy();
					}
				});
			}
			else
			{
				proxy.destroy();
			}
		}

		if(state instanceof JavaCommandLineState && !((JavaCommandLineState) state).shouldAddJavaProgramRunnerActions())
		{
			shouldAddDefaultActions = false;
		}
	}
	else
	{
		executionResult = state.execute(env.getExecutor(), this);
	}

	if(executionResult == null)
	{
		return null;
	}

	onProcessStarted(env.getRunnerSettings(), executionResult);

	final RunContentBuilder contentBuilder = new RunContentBuilder(executionResult, env);
	if(shouldAddDefaultActions)
	{
		addDefaultActions(contentBuilder, executionResult);
	}
	return contentBuilder.showRunContent(env.getContentToReuse());
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:59,代码来源:DefaultJavaProgramRunner.java


注:本文中的com.intellij.execution.ExecutionResult.getProcessHandler方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。