com.intellij.execution.ExecutionResult Java Examples

The following examples show how to use com.intellij.execution.ExecutionResult. 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: FreeRunConfiguration.java    From react-native-console with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
private ExecutionResult buildExecutionResult() throws ExecutionException {
    GeneralCommandLine commandLine = createDefaultCommandLine();
    ProcessHandler processHandler = createProcessHandler(commandLine);
    ProcessTerminatedListener.attach(processHandler);
    ConsoleView console = new TerminalExecutionConsole(getProject(), processHandler);

    console.print(
        "Welcome to React Native Console, now please click one button on top toolbar to start.\n",
        ConsoleViewContentType.SYSTEM_OUTPUT);
    console.attachToProcess(processHandler);

    console.print(
        "Give a Star or Suggestion:\n",
        ConsoleViewContentType.NORMAL_OUTPUT);


    processHandler.destroyProcess();
    return new DefaultExecutionResult(console, processHandler);
}
 
Example #2
Source File: BlazeGoDebugRunner.java    From intellij with Apache License 2.0 6 votes vote down vote up
private RunContentDescriptor doExecute(ExecutionEnvironment environment, RunProfileState state)
    throws ExecutionException {
  if (!(state instanceof BlazeGoDummyDebugProfileState)) {
    return null;
  }
  BlazeGoDummyDebugProfileState blazeState = (BlazeGoDummyDebugProfileState) state;
  GoApplicationRunningState goState = blazeState.toNativeState(environment);
  ExecutionResult executionResult = goState.execute(environment.getExecutor(), this);
  return XDebuggerManager.getInstance(environment.getProject())
      .startSession(
          environment,
          new XDebugProcessStarter() {
            @Override
            public XDebugProcess start(XDebugSession session) throws ExecutionException {
              RemoteVmConnection connection = new DlvRemoteVmConnection(true);
              XDebugProcess process =
                  new DlvDebugProcess(session, connection, executionResult, true, false);
              connection.open(goState.getDebugAddress());
              return process;
            }
          })
      .getRunContentDescriptor();
}
 
Example #3
Source File: FastBuildRunProfileState.java    From intellij with Apache License 2.0 6 votes vote down vote up
@Override
public ExecutionResult execute(Executor executor, ProgramRunner runner)
    throws ExecutionException {
  DefaultExecutionResult result = (DefaultExecutionResult) super.execute(executor, runner);
  AbstractRerunFailedTestsAction rerunFailedAction =
      SmRunnerUtils.createRerunFailedTestsAction(result);
  RerunFastBuildConfigurationWithBlazeAction rerunWithBlazeAction =
      new RerunFastBuildConfigurationWithBlazeAction(
          getConfiguration().getProject(), getFastBuildInfo().label(), getEnvironment());
  if (rerunFailedAction != null) {
    result.setRestartActions(rerunFailedAction, rerunWithBlazeAction);
  } else {
    result.setRestartActions(rerunWithBlazeAction);
  }
  return result;
}
 
Example #4
Source File: WeaveDebuggerRunner.java    From mule-intellij-plugins with Apache License 2.0 6 votes vote down vote up
@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();

}
 
Example #5
Source File: RoboVmRunner.java    From robovm-idea with GNU General Public License v2.0 6 votes vote down vote up
@Nullable
@Override
protected RunContentDescriptor doExecute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment environment) throws ExecutionException {
    if(DEBUG_EXECUTOR.equals(environment.getExecutor().getId())) {
        RoboVmRunConfiguration runConfig = (RoboVmRunConfiguration)environment.getRunProfile();
        RemoteConnection connection = new RemoteConnection(true, "127.0.0.1", "" + runConfig.getDebugPort(), false);
        connection.setServerMode(true);
        return attachVirtualMachine(state, environment, connection, false);
    } else {
        ExecutionResult executionResult = state.execute(environment.getExecutor(), this);
        if (executionResult == null) {
            return null;
        }
        return new RunContentBuilder(executionResult, environment).showRunContent(environment.getContentToReuse());
    }
}
 
Example #6
Source File: XQueryDebuggerRunner.java    From intellij-xquery with Apache License 2.0 6 votes vote down vote up
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 #7
Source File: Unity3dAttachRunner.java    From consulo-unity3d with Apache License 2.0 6 votes vote down vote up
@RequiredUIAccess
private static void setRunDescriptor(AsyncResult<RunContentDescriptor> result,
		ExecutionEnvironment environment,
		ExecutionResult executionResult,
		@Nullable UnityProcess process,
		@Nullable UnityProcess editorProcess)
{
	if(process == null)
	{
		result.rejectWithThrowable(new ExecutionException("Process not find for attach"));
		return;
	}

	boolean isEditor = editorProcess != null && Comparing.equal(editorProcess, process);

	try
	{
		result.setDone(runContentDescriptor(executionResult, environment, process, null, isEditor));
	}
	catch(ExecutionException e)
	{
		result.rejectWithThrowable(e);
	}
}
 
Example #8
Source File: GaugeCommandLineState.java    From Intellij-Plugin with Apache License 2.0 6 votes vote down vote up
@NotNull
@Override
public ExecutionResult execute(@NotNull Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
    addProjectClasspath();
    if (GaugeVersion.isGreaterOrEqual(GaugeRunConfiguration.TEST_RUNNER_SUPPORT_VERSION, false)
            && GaugeSettingsService.getSettings().useIntelliJTestRunner()) {
        ProcessHandler handler = startProcess();
        GaugeConsoleProperties properties = new GaugeConsoleProperties(config, "Gauge", executor, handler);
        ConsoleView console = SMTestRunnerConnectionUtil.createAndAttachConsole("Gauge", handler, properties);
        DefaultExecutionResult result = new DefaultExecutionResult(console, handler, createActions(console, handler));
        if (ActionManager.getInstance().getAction("RerunFailedTests") != null) {
            AbstractRerunFailedTestsAction action = properties.createRerunFailedTestsAction(console);
            if (action != null) {
                action.setModelProvider(((SMTRunnerConsoleView) console)::getResultsViewer);
                result.setRestartActions(action);
            }
        }
        return result;
    }
    return super.execute(executor, runner);
}
 
Example #9
Source File: Unity3dTestDebuggerRunner.java    From consulo-unity3d with Apache License 2.0 6 votes vote down vote up
@Override
@RequiredUIAccess
protected RunContentDescriptor doExecute(@Nonnull RunProfileState state, @Nonnull ExecutionEnvironment env) throws ExecutionException
{
	UnityProcess editorProcess = UnityEditorCommunication.findEditorProcess();
	if(editorProcess == null)
	{
		throw new ExecutionException("Editor is not responding");
	}
	FileDocumentManager.getInstance().saveAllDocuments();

	ExecutionResult executionResult = state.execute(env.getExecutor(), this);
	if(executionResult == null)
	{
		return null;
	}
	return Unity3dAttachRunner.runContentDescriptor(executionResult, env, editorProcess, (ConsoleView) executionResult.getExecutionConsole(), true);
}
 
Example #10
Source File: BlazePyDebugRunner.java    From intellij with Apache License 2.0 5 votes vote down vote up
@Override
protected PyDebugProcess createDebugProcess(
    XDebugSession xDebugSession,
    ServerSocket serverSocket,
    ExecutionResult executionResult,
    PythonCommandLineState pythonCommandLineState) {
  PyDebugProcess process =
      super.createDebugProcess(
          xDebugSession, serverSocket, executionResult, pythonCommandLineState);
  process.setPositionConverter(new BlazePyPositionConverter());
  return process;
}
 
Example #11
Source File: CppRunner.java    From CppTools with Apache License 2.0 5 votes vote down vote up
@Nullable
@Override
protected RunContentDescriptor doExecute(Project project, RunProfileState runProfileState, RunContentDescriptor runContentDescriptor, ExecutionEnvironment executionEnvironment) throws ExecutionException {
  FileDocumentManager.getInstance().saveAllDocuments();
  Executor executor = executionEnvironment.getExecutor();

  ExecutionResult executionResult = runProfileState.execute(executor, this);
  if (executionResult == null) return null;
  final RunContentBuilder contentBuilder = new RunContentBuilder(executionResult, executionEnvironment);
  onProcessStarted(executionEnvironment.getRunnerSettings(), executionResult);

  return contentBuilder.showRunContent(runContentDescriptor);
}
 
Example #12
Source File: SkylarkDebugProcess.java    From intellij with Apache License 2.0 5 votes vote down vote up
public SkylarkDebugProcess(XDebugSession session, ExecutionResult executionResult, int port) {
  super(session);
  this.project = session.getProject();
  this.executionResult = executionResult;
  this.transport = new DebugClientTransport(this, port);

  session.setPauseActionSupported(true);
}
 
Example #13
Source File: RoboVmRunner.java    From robovm-idea with GNU General Public License v2.0 5 votes vote down vote up
@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();
}
 
Example #14
Source File: BashTerminalCommandLineState.java    From BashSupport with Apache License 2.0 5 votes vote down vote up
@NotNull
@Override
public ExecutionResult execute(@NotNull Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
    String workingDir = BashRunConfigUtil.findWorkingDir(runConfig);
    GeneralCommandLine cmd = BashRunConfigUtil.createCommandLine(workingDir, runConfig);

    BashLocalTerminalRunner myRunner = new BashLocalTerminalRunner(runConfig.getProject(), runConfig.getScriptName(), cmd);
    myRunner.run();
    return new BashTerminalExecutionResult(myRunner.getProcessHandler());
}
 
Example #15
Source File: HaxeFlashDebuggingUtil.java    From intellij-haxe with Apache License 2.0 5 votes vote down vote up
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();
}
 
Example #16
Source File: HaxeFlashDebuggingUtil.java    From intellij-haxe with Apache License 2.0 5 votes vote down vote up
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, 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();
}
 
Example #17
Source File: TestExecutionState.java    From buck with Apache License 2.0 5 votes vote down vote up
@Nullable
@Override
public ExecutionResult execute(Executor executor, @NotNull ProgramRunner runner)
    throws ExecutionException {
  final ProcessHandler processHandler = runBuildCommand(executor);
  final TestConsoleProperties properties =
      new BuckTestConsoleProperties(
          processHandler, mProject, mConfiguration, "Buck test", executor);
  final ConsoleView console =
      SMTestRunnerConnectionUtil.createAndAttachConsole("buck test", processHandler, properties);
  return new DefaultExecutionResult(console, processHandler, AnAction.EMPTY_ARRAY);
}
 
Example #18
Source File: ImportedTestRunnableState.java    From consulo with Apache License 2.0 5 votes vote down vote up
@javax.annotation.Nullable
@Override
public ExecutionResult execute(Executor executor, @Nonnull ProgramRunner runner) throws ExecutionException {
  final MyEmptyProcessHandler handler = new MyEmptyProcessHandler();
  final SMTRunnerConsoleProperties properties = myRunProfile.getProperties();
  RunProfile configuration;
  final String frameworkName;
  if (properties != null) {
    configuration = properties.getConfiguration();
    frameworkName = properties.getTestFrameworkName();
  }
  else {
    configuration = myRunProfile;
    frameworkName = "Import Test Results";
  }
  final ImportedTestConsoleProperties consoleProperties = new ImportedTestConsoleProperties(properties, myFile, handler, myRunProfile.getProject(),
                                                                                            configuration, frameworkName, executor);
  final BaseTestsOutputConsoleView console = SMTestRunnerConnectionUtil.createConsole(consoleProperties.getTestFrameworkName(),
                                                                                      consoleProperties);
  final JComponent component = console.getComponent();
  AbstractRerunFailedTestsAction rerunFailedTestsAction = null;
  if (component instanceof TestFrameworkRunningModel) {
    rerunFailedTestsAction = consoleProperties.createRerunFailedTestsAction(console);
    if (rerunFailedTestsAction != null) {
      rerunFailedTestsAction.setModelProvider(new Getter<TestFrameworkRunningModel>() {
        @Override
        public TestFrameworkRunningModel get() {
          return (TestFrameworkRunningModel)component;
        }
      });
    }
  }

  console.attachToProcess(handler);
  final DefaultExecutionResult result = new DefaultExecutionResult(console, handler);
  if (rerunFailedTestsAction != null) {
    result.setRestartActions(rerunFailedTestsAction);
  }
  return result;
}
 
Example #19
Source File: DeployToServerState.java    From consulo with Apache License 2.0 5 votes vote down vote up
@javax.annotation.Nullable
@Override
public ExecutionResult execute(Executor executor, @Nonnull ProgramRunner runner) throws ExecutionException {
  final ServerConnection connection = ServerConnectionManager.getInstance().getOrCreateConnection(myServer);
  final Project project = myEnvironment.getProject();
  RemoteServersView.getInstance(project).showServerConnection(connection);

  final DebugConnector<?,?> debugConnector;
  if (DefaultDebugExecutor.getDebugExecutorInstance().equals(executor)) {
    debugConnector = myServer.getType().createDebugConnector();
  }
  else {
    debugConnector = null;
  }
  connection.computeDeployments(new Runnable() {
    @Override
    public void run() {
      connection.deploy(new DeploymentTaskImpl(mySource, myConfiguration, project, debugConnector, myEnvironment),
                        new ParameterizedRunnable<String>() {
                          @Override
                          public void run(String s) {
                            RemoteServersView.getInstance(project).showDeployment(connection, s);
                          }
                        });
    }
  });
  return null;
}
 
Example #20
Source File: RemoteProcessSupport.java    From consulo with Apache License 2.0 5 votes vote down vote up
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 #21
Source File: RunContentBuilder.java    From consulo with Apache License 2.0 5 votes vote down vote up
/**
 * @deprecated use {@link #RunContentBuilder(com.intellij.execution.ExecutionResult, ExecutionEnvironment)}
 * to remove in IDEA 14
 */
@SuppressWarnings("UnusedParameters")
public RunContentBuilder(@Nonnull Project project,
                         ProgramRunner runner,
                         Executor executor,
                         ExecutionResult executionResult,
                         @Nonnull ExecutionEnvironment environment) {
  //noinspection deprecation
  this(runner, executionResult, environment);
}
 
Example #22
Source File: DefaultProgramRunner.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
protected RunContentDescriptor doExecute(@Nonnull RunProfileState state, @Nonnull ExecutionEnvironment env) throws ExecutionException {
  FileDocumentManager.getInstance().saveAllDocuments();
  ExecutionResult executionResult = state.execute(env.getExecutor(), this);
  if (executionResult == null) {
    return null;
  }
  return new RunContentBuilder(executionResult, env).showRunContent(env.getContentToReuse());
}
 
Example #23
Source File: FlutterDebugProcess.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public FlutterDebugProcess(@NotNull FlutterApp app,
                           @NotNull ExecutionEnvironment executionEnvironment,
                           @NotNull XDebugSession session,
                           @NotNull ExecutionResult executionResult,
                           @NotNull DartUrlResolver dartUrlResolver,
                           @NotNull PositionMapper mapper) {
  super(executionEnvironment, session, executionResult, dartUrlResolver, app.getConnector(), mapper);
  this.app = app;
}
 
Example #24
Source File: BlazeJavaRunProfileState.java    From intellij with Apache License 2.0 5 votes vote down vote up
@Override
public ExecutionResult execute(Executor executor, ProgramRunner runner)
    throws ExecutionException {
  if (BlazeCommandRunConfigurationRunner.isDebugging(getEnvironment())) {
    new MultiRunDebuggerSessionListener(getEnvironment(), this).startListening();
  }
  DefaultExecutionResult result = (DefaultExecutionResult) super.execute(executor, runner);
  return SmRunnerUtils.attachRerunFailedTestsAction(result);
}
 
Example #25
Source File: ReplGenericState.java    From reasonml-idea-plugin with MIT License 5 votes vote down vote up
@Nullable
@Override
public ExecutionResult execute(Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
    ProcessHandler processHandler = startProcess();
    if (processHandler == null) {
        return null;
    }

    PromptConsoleView consoleView = new PromptConsoleView(m_environment.getProject(), true, true);
    consoleView.attachToProcess(processHandler);

    return new DefaultExecutionResult(consoleView, processHandler);
}
 
Example #26
Source File: TestDebugProcess.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public TestDebugProcess(@NotNull ExecutionEnvironment executionEnvironment,
                        @NotNull XDebugSession session,
                        @NotNull ExecutionResult executionResult,
                        @NotNull DartUrlResolver dartUrlResolver,
                        @NotNull ObservatoryConnector connector,
                        @NotNull PositionMapper mapper) {
  super(executionEnvironment, session, executionResult, dartUrlResolver, connector, mapper);
  this.connector = connector;
}
 
Example #27
Source File: WeaveDebugProcess.java    From mule-intellij-plugins with Apache License 2.0 5 votes vote down vote up
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 #28
Source File: BlazeAndroidRunState.java    From intellij with Apache License 2.0 5 votes vote down vote up
@Nullable
@Override
public ExecutionResult execute(Executor executor, ProgramRunner runner)
    throws ExecutionException {
  DefaultExecutionResult result = executeInner(executor, runner);
  if (result == null) {
    return null;
  }
  return SmRunnerUtils.attachRerunFailedTestsAction(result);
}
 
Example #29
Source File: AttachState.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
protected RunContentDescriptor launch(@NotNull ExecutionEnvironment env) throws ExecutionException {
  Project project = getEnvironment().getProject();
  FlutterDevice device = DeviceService.getInstance(project).getSelectedDevice();
  if (device == null) {
    showNoDeviceConnectedMessage(project);
    return null;
  }
  FlutterApp app = getCreateAppCallback().createApp(device);
  // Cache for use in console configuration, and for updating registered extensionRPCs.
  FlutterApp.addToEnvironment(env, app);
  ExecutionResult result = setUpConsoleAndActions(app);
  return createDebugSession(env, app, result).getRunContentDescriptor();
}
 
Example #30
Source File: BazelTestDebugProcess.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public BazelTestDebugProcess(@NotNull ExecutionEnvironment executionEnvironment,
                             @NotNull XDebugSession session,
                             @NotNull ExecutionResult executionResult,
                             @NotNull DartUrlResolver dartUrlResolver,
                             @NotNull ObservatoryConnector connector,
                             @NotNull PositionMapper mapper) {
  super(executionEnvironment, session, executionResult, dartUrlResolver, connector, mapper);
  this.connector = connector;
}