Package com.intellij.execution

Examples of com.intellij.execution.CantRunException


  }

  public String getJdkPath() throws CantRunException {
    final ProjectJdk jdk = getJdk();
    if(jdk == null) {
      throw new CantRunException(ExecutionBundle.message("no.jdk.specified..error.message"));
    }

    final String jdkHome = jdk.getHomeDirectory().getPresentableUrl();
    if(jdkHome == null || jdkHome.length() == 0) {
      throw new CantRunException(ExecutionBundle.message("home.directory.not.specified.for.jdk.error.message"));
    }
    return jdkHome;
  }
View Full Code Here


  @NotNull
  @Override
  protected ProcessHandler startProcess() throws ExecutionException {
    final Sdk sdk = RustSdkUtil.getSdk(project);
    if ( sdk == null ) {
      throw new CantRunException("No Rust sdk defined for this project");
    }

    final RustSdkData sdkData = (RustSdkData)sdk.getSdkAdditionalData();
    if ( sdkData == null ) {
      throw new CantRunException("No Rust sdk defined for this project");
    }

    String projectDir = project.getBasePath();

    if (projectDir == null) {
      throw new CantRunException("Could not retrieve the project directory");
    }

    final SimpleProgramParameters params = new SimpleProgramParameters();
    ProgramParametersUtil.configureConfiguration(params, rustConfiguration);

    String outputPath = CompilerPaths.getModuleOutputPath(rustConfiguration.getModules()[0], false);
    if (outputPath == null) {
      throw new CantRunException("Could not retrieve the output directory");
    }

    // Build and run
    String execName = outputPath.concat("/").concat(rustConfiguration.getName());
View Full Code Here

    @Nullable
    @Override
    public RunProfileState getState(@NotNull Executor executor, @NotNull ExecutionEnvironment env) throws ExecutionException {
        final VirtualFile script = getScriptPath();
        if (script == null) {
            throw new CantRunException("Cannot find script " + scriptPath);
        }

        final MongoCommandLineState state = new MongoCommandLineState(this, env);
        state.setConsoleBuilder(TextConsoleBuilderFactory.getInstance().createBuilder(getProject()));
        return state;
View Full Code Here

TOP

Related Classes of com.intellij.execution.CantRunException

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.