Package com.intellij.execution

Examples of com.intellij.execution.ExecutionException


  }

  private ErlangRunningState createRunningState() throws ExecutionException {
    ErlangRunningState state = getRunConfiguration().getState(myExecutionEnvironment.getExecutor(), myExecutionEnvironment);
    if (state == null) {
      throw new ExecutionException("Failed to execute a run configuration.");
    }
    return state;
  }
View Full Code Here


    getSession().getConsoleView().attachToProcess(myErlangProcessHandler);
    myErlangProcessHandler.startNotify();
    if (runningState instanceof ErlangRemoteDebugRunningState) {
      ErlangRemoteDebugRunConfiguration runConfiguration = (ErlangRemoteDebugRunConfiguration) getRunConfiguration();
      if (StringUtil.isEmptyOrSpaces(runConfiguration.getErlangNode())) {
        throw new ExecutionException("Bad run configuration: remote Erlang node is not specified.");
      }
      myDebuggerNode.debugRemoteNode(runConfiguration.getErlangNode(), runConfiguration.getCookie());
    }
    else {
      ErlangRunningState.ErlangEntryPoint entryPoint = runningState.getDebugEntryPoint();
View Full Code Here

      for (String beam : beams) {
        copyBeamTo(beam, tempDirectory);
      }
      commandLine.addParameters("-pa", tempDirectory.getPath());
    } catch (IOException e) {
      throw new ExecutionException("Failed to setup debugger environment", e);
    }
  }
View Full Code Here

  public final void setExePath(GeneralCommandLine commandLine) throws ExecutionException {
    Sdk sdk = ModuleRootManager.getInstance(myModule).getSdk();
    String homePath = sdk != null ? sdk.getHomePath() : null;
    if (homePath == null) {
      throw new ExecutionException("Invalid module SDK.");
    }
    String erl = FileUtil.toSystemDependentName(ErlangSdkType.getTopLevelExecutable(homePath).getAbsolutePath());
    commandLine.setExePath(erl);
  }
View Full Code Here

  }

  public RunProfileState getState(@NotNull Executor executor, @NotNull ExecutionEnvironment environment) throws ExecutionException {
    final Module module = getModule();
    if (module == null) {
      throw new ExecutionException("Module is not specified");
    }

    final ModuleRootManager rootManager = ModuleRootManager.getInstance(module);
    final Sdk sdk = rootManager.getSdk();
    if (sdk == null || !(sdk.getSdkType() instanceof JavaSdkType)) {
View Full Code Here

  }

  private OSProcessHandler launchBuildProcess(Project project, UUID sessionId, CompileScope scope) throws ExecutionException {
    final Sdk defaultSdk = ProjectRootManager.getInstance(project).getProjectSdk();
    if (defaultSdk == null) {
      throw new ExecutionException("No SDK configured for this project.");
    }
    if (!(defaultSdk.getSdkType() instanceof RustSdkType)) {
      throw new ExecutionException("This project doesn't have a Rust SDK configured.");
    }
    final GeneralCommandLine cmdLine = new GeneralCommandLine();

    final RunConfiguration runConfig = scope.getUserData(CompileStepBeforeRun.RUN_CONFIGURATION);
    if (runConfig == null) {
      throw new ExecutionException("'Run Configuration' not found. If you're trying to compile without running, that's not yet supported");
    }
    final RustConfiguration rustConfiguration = (RustConfiguration) runConfig;
    final CompilerModuleExtension compilerModuleExtension = CompilerModuleExtension.getInstance(rustConfiguration.getModules()[0]);
    if (compilerModuleExtension == null) {
      throw new ExecutionException("Cannot find compiler module extension from module");
    }

        final String outputPathUrl = CompilerPaths.getModuleOutputPath(rustConfiguration.getModules()[0], false);

    File outputPathFile = new File(outputPathUrl);
    if (!outputPathFile.exists()) {
      if (!outputPathFile.mkdirs()) {
        throw new ExecutionException("Cannot create output path '" + outputPathUrl + "'");
      }
    }

    cmdLine.setWorkDirectory(new File(project.getBasePath()));
    cmdLine.setExePath(RustSdkUtil.testRustSdk(defaultSdk.getHomePath()).pathRustc);
View Full Code Here

TOP

Related Classes of com.intellij.execution.ExecutionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.