Package com.intellij.execution

Examples of com.intellij.execution.ExecutionException


        String descriptorId = config.getServerDescriptorId();

        NginxServerDescriptor descriptor = NginxServersConfiguration.getInstance().getDescriptorById(descriptorId);
        if (descriptor == null) {
            throw new ExecutionException(NginxBundle.message("run.error.servernotfound"));
        }

        NginxServerDescriptor descriptorCopy = descriptor.clone();

        VirtualFile executableVirtualFile = LocalFileSystem.getInstance().findFileByPath(descriptorCopy.getExecutablePath());
        if (executableVirtualFile == null || executableVirtualFile.isDirectory()) {
            throw new ExecutionException(NginxBundle.message("run.error.badpath", descriptorCopy.getExecutablePath()));
        }

        PlatformDependentTools pdt = ApplicationManager.getApplication().getComponent(PlatformDependentTools.class);

        ProcessBuilder builder = new ProcessBuilder(pdt.getStartCommand(descriptorCopy));
        builder.directory(new File(executableVirtualFile.getParent().getPath()));
        try {
            return new NginxProcessHandler(builder.start(), StringUtil.join(pdt.getStartCommand(descriptorCopy), " "), descriptorCopy.clone());
        } catch (IOException e) {
            throw new ExecutionException(e.getMessage(), e);
        }

    }
View Full Code Here


    if (DefaultDebugExecutor.EXECUTOR_ID.equals(executorId)) {
      try {
        return doExecuteDartDebug(state, env);
      }
      catch (RuntimeConfigurationError e) {
        throw new ExecutionException(e);
      }
    }

    LOG.error("Unexpected executor id: " + executorId);
    return null;
View Full Code Here

    try {
      myRunnerParameters.check(env.getProject());
    }
    catch (RuntimeConfigurationError e) {
      throw new ExecutionException(e);
    }

    final TextConsoleBuilder builder = getConsoleBuilder();
    if (builder instanceof TextConsoleBuilderImpl) {
      ((TextConsoleBuilderImpl)builder).setUsePredefinedMessageFilter(false);
View Full Code Here

  }

  private GeneralCommandLine createCommandLine(final @Nullable String overriddenMainFilePath) throws ExecutionException {
    final DartSdk sdk = DartSdk.getGlobalDartSdk();
    if (sdk == null) {
      throw new ExecutionException(DartBundle.message("dart.sdk.is.not.configured"));
    }

    final String dartExePath = DartSdkUtil.getDartExePath(sdk);

    final VirtualFile dartFile;
    try {
      dartFile = myRunnerParameters.getDartFile();
    }
    catch (RuntimeConfigurationError e) {
      throw new ExecutionException(e); // can't happen because already checked
    }

    final String workingDir = StringUtil.isEmptyOrSpaces(myRunnerParameters.getWorkingDirectory())
                              ? dartFile.getParent().getPath()
                              : myRunnerParameters.getWorkingDirectory();
View Full Code Here

    final VirtualFile dartFile;
    try {
      dartFile = runnerParameters.getDartFile();
    }
    catch (RuntimeConfigurationError e) {
      throw new ExecutionException(e);
    }

    final VirtualFile[] packageRoots = DartUrlResolver.getInstance(project, dartFile).getPackageRoots();
    if (packageRoots.length > 0) {
      // more than one package root is not supported by the [SDK]/bin/dart tool
View Full Code Here

  public RunProfileState getState(@NotNull Executor executor, @NotNull ExecutionEnvironment env) throws ExecutionException {
    try {
      checkConfiguration();
    }
    catch (RuntimeConfigurationError e) {
      throw new ExecutionException(e.getMessage());
    }
    catch (RuntimeConfigurationException ignored) {
      // does nothing
    }
    GlobalSettings globalSettings = myGlobalSettingsRef.get();
View Full Code Here

      final File clientAppFile;
      try {
        clientAppFile = server.getKarmaJsSourcesLocator().getClientAppFile();
      }
      catch (IOException e) {
        throw new ExecutionException("Can't find karma-intellij test runner", e);
      }
      if (server.areBrowsersReady()) {
        return createOSProcessHandler(server, clientAppFile);
      }
    }
View Full Code Here

    if (destination.isIOSDevice()) {
      return destination.getIOSDeviceSafe().getName();
    }
    else if (destination.isIOSSimulator()) {
      IOSBuildDestination.Simulator simulator = destination.getIOSSimulator();
      if (simulator == null) throw new ExecutionException("Simulator not specified.");

      switch (simulator.getDeviceFamilyID()) {
        case SimulatorConfiguration.IPHONE_FAMILY:
          return "iPhone Simulator";
        case SimulatorConfiguration.IPAD_FAMILY:
          return "iPad Simulator";
      }
      throw new ExecutionException("Unknown simulator type: " + simulator);
    }
    throw new ExecutionException("Unsupported destination: " + destination);
  }
View Full Code Here

                       true
      );
    }
    catch (ScriptException e) {
      LOG.info("Reveal script failed:\n" + script);
      throw new ExecutionException("Cannot refresh Reveal: " + e.getMessage(), e);
    }
  }
View Full Code Here

                                    @NotNull BuildConfiguration buildConfiguration,
                                    @NotNull GeneralCommandLine commandLine,
                                    @NotNull File mainExecutable,
                                    @NotNull final RevealSettings settings) throws ExecutionException {
    File libReveal = Reveal.getRevealLib();
    if (libReveal == null || !libReveal.exists()) throw new ExecutionException("Reveal library not found");

    Reveal.LOG.info("Reveal lib found at " + libReveal);

    if (hasBundledRevealLib(buildConfiguration, libReveal)) {
      return new File(commandLine.getExePath(), libReveal.getName());
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.