Package com.intellij.execution.configurations

Examples of com.intellij.execution.configurations.CommandLineTokenizer


        line.setExePath(GHCUtil.getCommandPath(homePath, "ghci"));
        line.setWorkDirectory(workingDir);
        SdkAdditionalData sdkAdditionalData = sdk.getSdkAdditionalData();
        if (sdkAdditionalData instanceof HaskellSdkAdditionalData) {
            HaskellSdkAdditionalData data = (HaskellSdkAdditionalData) sdkAdditionalData;
            CommandLineTokenizer tokenizer = new CommandLineTokenizer(data.getGhcOptions());
            while (tokenizer.hasMoreTokens()) {
                line.addParameter(tokenizer.nextToken());
            }
        }
        return line;
    }
View Full Code Here


    public final List<String> getCompileOptionsList(String... additionalArgs) {
        List<String> args = new ArrayList<String>();
        args.add(exe);
        args.addAll(Arrays.asList("-g", libPath));
        CommandLineTokenizer tokenizer = new CommandLineTokenizer(ghcOptions == null ? "" : ghcOptions);
        while (tokenizer.hasMoreTokens()) {
            args.addAll(Arrays.asList("-c", tokenizer.nextToken()));
        }
        args.addAll(Arrays.asList(additionalArgs));
        return args;
    }
View Full Code Here

    commandLine.addParameter("--ignore-unrecognized-flags");
    commandLine.addParameter("--enable_async");

    final String vmOptions = runnerParameters.getVMOptions();
    if (vmOptions != null) {
      final StringTokenizer vmOptionsTokenizer = new CommandLineTokenizer(vmOptions);
      while (vmOptionsTokenizer.hasMoreTokens()) {
        commandLine.addParameter(vmOptionsTokenizer.nextToken());
      }
    }

    if (runnerParameters.isCheckedMode()) {
      commandLine.addParameter(DartiumUtil.CHECKED_MODE_OPTION);
    }

    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
      commandLine.addParameter("--package-root=" + FileUtil.toSystemDependentName(packageRoots[0].getPath()));
    }

    if (DefaultDebugExecutor.EXECUTOR_ID.equals(getEnvironment().getExecutor().getId())) {
      myDebuggingPort = NetUtils.tryToFindAvailableSocketPort();
      commandLine.addParameter("--debug:" + myDebuggingPort);
      commandLine.addParameter("--break-at-isolate-spawn");
    }

    myObservatoryPort = PubServerManager.findOneMoreAvailablePort(myDebuggingPort);
    commandLine.addParameter("--enable-vm-service:" + myObservatoryPort);
    commandLine.addParameter("--trace_service_pause_events");

    commandLine.addParameter(FileUtil.toSystemDependentName(overriddenMainFilePath == null ? dartFile.getPath() : overriddenMainFilePath));

    final String arguments = runnerParameters.getArguments();
    if (arguments != null) {
      StringTokenizer argumentsTokenizer = new CommandLineTokenizer(arguments);
      while (argumentsTokenizer.hasMoreTokens()) {
        commandLine.addParameter(argumentsTokenizer.nextToken());
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.intellij.execution.configurations.CommandLineTokenizer

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.