Package com.intellij.execution

Examples of com.intellij.execution.ExecutionException


      libRevealInTempDir = new File(tempDir, libReveal.getName());

      FileUtil.copy(libReveal, libRevealInTempDir);
    }
    catch (IOException e) {
      throw new ExecutionException("Cannot create a temporary copy of Reveal library", e);
    }

    try {
      AppCodeInstaller.codesignBinary(buildConfiguration, mainExecutable, tempDir.getAbsolutePath(), libRevealInTempDir.getName());
      AMDeviceUtil.transferPathToApplicationBundle(device, libRevealInTempDir.getParent(), "/tmp", bundleId);
View Full Code Here


    String result = environment.getUserData(BUNDLE_ID_KEY);
    if (result != null) return result;

    File plistFile = new File(product, "Info.plist");
    Plist plist = PlistDriver.readAnyFormatSafe(plistFile);
    if (plist == null) throw new ExecutionException("Info.plist not found at " + plistFile);

    result = plist.getString("CFBundleIdentifier");
    if (result == null) throw new ExecutionException("CFBundleIdentifier not found in " + plistFile);

    environment.putUserData(BUNDLE_ID_KEY, result);
    return result;
  }
View Full Code Here

  public JstdRunProfileState getState(@NotNull ExecutionEnvironment env, @Nullable String coverageFilePath) throws ExecutionException {
    try {
      checkConfiguration();
    }
    catch (RuntimeConfigurationError e) {
      throw new ExecutionException(e.getMessage());
    }
    catch (RuntimeConfigurationException ignored) {
      // does nothing
    }
    return new JstdRunProfileState(env, myRunSettings, coverageFilePath);
View Full Code Here

  @NotNull
  private ResolvedConfiguration resolveConfiguration() throws ExecutionException {
    VirtualFile configVirtualFile = VfsUtil.findFileByIoFile(myConfigFile, false);
    if (configVirtualFile == null) {
      throw new ExecutionException("Cannot find JsTestDriver configuration file " + myConfigFile.getAbsolutePath());
    }
    BasePaths dirBasePaths = new BasePaths(myConfigFile.getParentFile());
    final byte[] content;
    try {
      content = configVirtualFile.contentsToByteArray();
    }
    catch (IOException e) {
      throw new ExecutionException("Cannot read JsTestDriver configuration file " + configVirtualFile.getPath());
    }
    Reader reader = new InputStreamReader(new ByteArrayInputStream(content), Charset.defaultCharset());
    try {
      YamlParser yamlParser = new YamlParser();
      ParsedConfiguration parsedConfiguration = (ParsedConfiguration) yamlParser.parse(reader, dirBasePaths);
      JstdConfigParsingUtils.wipeCoveragePlugin(parsedConfiguration);
      return JstdConfigParsingUtils.resolveConfiguration(parsedConfiguration);
    }
    catch (Exception e) {
      String message = "Malformed JsTestDriver configuration file " + configVirtualFile.getPath();
      LOG.warn(message, e);
      throw new ExecutionException(message);
    }
    finally {
      try {
        reader.close();
      }
View Full Code Here

      ProgressIndicator pi = ProgressManager.getInstance().getProgressIndicator();
      ApplicationManager.getApplication().invokeAndWait(runnable, pi != null ? pi.getModalityState() : ModalityState.NON_MODAL);
    }
    if (!error.isNull()) {
      //noinspection ThrowableResultOfMethodCallIgnored
      throw new ExecutionException(error.get().getMessage());
    }
  }
View Full Code Here

      ApplicationManager.getApplication().invokeAndWait(runnable, pi != null ? pi.getModalityState() : ModalityState.NON_MODAL);
    }

    if (!error.isNull()) {
      //noinspection ThrowableResultOfMethodCallIgnored
      throw new ExecutionException(error.get().getMessage());
    }
    return launcherFile.get();
  }
View Full Code Here

      public void run() {
        try {
          final VirtualFile componentFile =
            LocalFileSystem.getInstance().refreshAndFindFileByPath(params.getPath());
          if (componentFile == null) {
            throw new ExecutionException("File " + params.getPath() + " not found");
          }

          // creating script files
          final VirtualFile directory = componentFile.getParent();
          final String launcherFileName = "mxunit-launcher.cfc";//generateUniqueName("mxunit-launcher", project);
View Full Code Here

    if (myRunSettings.isExternalServerType()) {
      return executeWithServer(null);
    }
    JstdServer ideServer = JstdServerRegistry.getInstance().getServer();
    if (ideServer == null || !ideServer.isProcessRunning()) {
      throw new ExecutionException("JsTestDriver server is not running unexpectedly");
    }
    return executeWithServer(ideServer);
  }
View Full Code Here

  }

  @NotNull
  public ExecutionResult executeWithServer(@Nullable JstdServer ideServer) throws ExecutionException {
    if (!myRunSettings.isExternalServerType() && ideServer == null) {
      throw new ExecutionException("[Internal error] Local JsTestDriver server running in IDE not found");
    }
    ProcessHandler processHandler = createProcessHandler(ideServer);
    ConsoleView consoleView = createSMTRunnerConsoleView(ideServer);
    consoleView.attachToProcess(processHandler);
    DefaultExecutionResult executionResult = new DefaultExecutionResult(consoleView, processHandler);
View Full Code Here

    if (testType == TestType.ALL_CONFIGS_IN_DIRECTORY) {
      parameters.put(TestRunner.ParameterKey.ALL_CONFIGS_IN_DIRECTORY, myRunSettings.getDirectory());
    }
    List<VirtualFile> jstdConfigs = JstdSettingsUtil.collectJstdConfigs(myEnvironment.getProject(), myRunSettings);
    if (jstdConfigs.isEmpty()) {
      throw new ExecutionException("Can't find JsTestDriver configuration file.");
    }
    parameters.put(TestRunner.ParameterKey.CONFIG_FILES, joinJstdConfigs(jstdConfigs));
    TestFileScope testFileScope = buildTestFileScope(myEnvironment.getProject(), myRunSettings);
    if (!testFileScope.isAll()) {
      parameters.put(TestRunner.ParameterKey.TESTS, testFileScope.serialize());
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.