Package org.eclipse.jdt.launching

Examples of org.eclipse.jdt.launching.ExecutionArguments


    try {
      monitor.subTask("verifying installation");

      // Program & VM arguments
      ExecutionArguments execArgs = new ExecutionArguments(
          getVMArguments(configuration),
          getProgramArguments(configuration));

      // Create VM configuration
      // here the classpath means for the Jetty Server , not for the
      // application! by TonyQ 2011/3/7
      VMRunnerConfiguration runConfig = new VMRunnerConfiguration(
          Plugin.BOOTSTRAP_CLASS_NAME,
          getJettyClasspath(configuration));

      // logger to list classpaths
      // for(String path:getJettyClasspath(configuration)){
      // System.out.println("path:"+path);
      // }
      runConfig.setProgramArguments(execArgs.getProgramArgumentsArray());

      // Environment variables
      runConfig.setEnvironment(getEnvironment(configuration));

      boolean debug = ILaunchManager.DEBUG_MODE.equals(mode);
      // Here prepare the classpath is really for webapp in Runtime
      // Arguments , too.
      runConfig.setVMArguments(getRuntimeArguments(configuration,
          execArgs.getVMArgumentsArray(),debug));

      runConfig
          .setWorkingDirectory(getWorkingDirectoryAbsolutePath(configuration));
      runConfig
          .setVMSpecificAttributesMap(getVMSpecificAttributesMap(configuration));
View Full Code Here


        // Verify the configuration
        String mainTypeName = verifyMainTypeName(configuration);
        IVMInstall vm = verifyVMInstall(configuration);
        IVMRunner runner = vm.getVMRunner(mode);

        ExecutionArguments execArgs =
            new ExecutionArguments(getVMArguments(configuration), getProgramArguments(configuration));
        Map vmAttributesMap = getVMSpecificAttributesMap(configuration);
        String[] classpath = getClasspath(configuration);

        File workingDir = verifyWorkingDirectory(configuration);
        String workingDirName = null;
        if (workingDir != null)
            workingDirName = workingDir.getAbsolutePath();

        // Create a VM runner configuration
        VMRunnerConfiguration runConfig = new VMRunnerConfiguration(mainTypeName, classpath);
        runConfig.setProgramArguments(execArgs.getProgramArgumentsArray());
        runConfig.setVMArguments(execArgs.getVMArgumentsArray());
        runConfig.setVMSpecificAttributesMap(vmAttributesMap);
        runConfig.setWorkingDirectory(workingDirName);
        runConfig.setBootClassPath(getBootpath(configuration));

        // Run!!
View Full Code Here

    String pgmArgs = getProgramArguments(configuration);
    String vmArgs = getVMArguments(configuration);
    String[] envp = getEnvironment(configuration);

    ExecutionArguments execArgs = new ExecutionArguments(vmArgs, pgmArgs);
    Map vmAttributesMap = getVMSpecificAttributesMap(configuration);
    String[] classpath = getClasspath(configuration);

    // Create VM config
    VMRunnerConfiguration runConfig = new VMRunnerConfiguration(mainTypeName, classpath);
    runConfig.setProgramArguments(execArgs.getProgramArgumentsArray());
    runConfig.setVMArguments(execArgs.getVMArgumentsArray());
    runConfig.setWorkingDirectory(workingDirName);
    runConfig.setEnvironment(envp);
    runConfig.setVMSpecificAttributesMap(vmAttributesMap);

    // Bootpath
View Full Code Here

      String[] envp = getEnvironment(configuration);

      // Program & VM arguments
      String pgmArgs = getProgramArguments(configuration);
      String vmArgs = getVMArguments(configuration);
      ExecutionArguments execArgs = new ExecutionArguments(vmArgs, pgmArgs);

      // VM-specific attributes
      Map vmAttributesMap = getVMSpecificAttributesMap(configuration);

      // Class paths
      String[] classpath = getClasspath(configuration);
      String[] webAppClasspathArray = getProjectClasspath(configuration);
      String webAppClasspath = null;
      {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < webAppClasspathArray.length; i++) {
          String path = webAppClasspathArray[i];
          if (sb.length() > 0)
            sb.append(File.pathSeparator);
          sb.append(path);
        }
        webAppClasspath = sb.toString();
      }

      // Create VM configuration
      VMRunnerConfiguration runConfig = new VMRunnerConfiguration(mainTypeName,
          classpath);
      runConfig.setProgramArguments(execArgs.getProgramArgumentsArray());
      runConfig.setEnvironment(envp);

      List<String> runtimeVmArgs = getJettyArgs(configuration);
      runtimeVmArgs.add("-Drjrclasspath=" + webAppClasspath);
      runtimeVmArgs.addAll(Arrays.asList(execArgs.getVMArgumentsArray()));

      runConfig.setVMArguments(runtimeVmArgs.toArray(new String[runtimeVmArgs
          .size()]));
      runConfig.setWorkingDirectory(workingDirName);
      runConfig.setVMSpecificAttributesMap(vmAttributesMap);
View Full Code Here

    if (workingDir != null)
      workingDirName = workingDir.getAbsolutePath();
   
    // Program & VM args
    String vmArgs = getVMArguments(configuration);
    ExecutionArguments execArgs = new ExecutionArguments(vmArgs, "");
    String[] envp = DebugPlugin.getDefault().getLaunchManager().getEnvironment(configuration);
   
    // copy jar files which are required to execute JavaScript
    JavaScriptLaunchUtil.copyLibraries();
   
    VMRunnerConfiguration runConfig = new VMRunnerConfiguration(
        JavaScriptLaunchConstants.JAVASCRIPT_EXECUTOR,
        JavaScriptLaunchUtil.getClassPathAsStringArray());
   
    List<String> args = new ArrayList<String>();
   
    String script = configuration.getAttribute(
        JavaScriptLaunchConstants.ATTR_JAVASCRIPT_FILE, "");
    args.add(fixArgument(script));
   
    List includes = configuration.getAttribute(
        JavaScriptLaunchConstants.ATTR_JAVASCRIPT_INCLUDES, Collections.EMPTY_LIST);
    IWorkspaceRoot wsroot = ResourcesPlugin.getWorkspace().getRoot();
   
    for(int i=0;i<includes.size();i++){
      String include = (String)includes.get(i);
      if(include.startsWith(JavaScriptLibraryTable.PREFIX)){
        IResource resource = wsroot.findMember(include.substring(JavaScriptLibraryTable.PREFIX.length()));
        if(resource!=null && resource instanceof IFile && resource.exists()){
          args.add(fixArgument(((IFile)resource).getLocation().toString()));
        }
      } else {
        args.add(fixArgument(include));
      }
    }
   
    runConfig.setVMArguments(execArgs.getVMArgumentsArray());
    runConfig.setProgramArguments(args.toArray(new String[args.size()]));
    runConfig.setWorkingDirectory(workingDirName);
    runConfig.setEnvironment(envp);
   
    Map vmAttributesMap = getVMSpecificAttributesMap(configuration);
View Full Code Here

        writeConfigProperties(configuration);
        writeSystemProperties(configuration);
        writeStartupProperties(configuration);

        return new ExecutionArguments("", args).getProgramArgumentsArray(); //$NON-NLS-1$
    }
View Full Code Here

        args = args == null ? "" : getSubstitutedString(args); //$NON-NLS-1$

        final IPath configProperties = new Path(new File(getConfigDir(configuration), FELIX_CONFIG_PROPERTIES_FILE).getAbsolutePath());
        final IPath systemProperties = new Path(new File(getConfigDir(configuration), FELIX_SYSTEM_PROPERTIES_FILE).getAbsolutePath());

        final String[] vmArgs = new ExecutionArguments("", args).getVMArgumentsArray(); //$NON-NLS-1$
       
        // arraycopy works for JDK 5 & 6
        final String[] newVmArgs = new String[vmArgs.length + 2];
        System.arraycopy(vmArgs, 0, newVmArgs, 0, vmArgs.length);
       
View Full Code Here

    StringBuilder vmArgs = new StringBuilder(ConfigurationHelper.getJvmArgs(configuration))
        // getVMArguments(configuration))
        .append(" ")
        .append(TestNGLaunchConfigurationConstants.VM_ENABLEASSERTION_OPTION); // $NON-NLS-1$
    addDebugProperties(vmArgs);
    ExecutionArguments execArgs = new ExecutionArguments(vmArgs.toString(), ""); //$NON-NLS-1$
    String[] envp = DebugPlugin.getDefault().getLaunchManager().getEnvironment(configuration);

    VMRunnerConfiguration runConfig = createVMRunner(configuration, launch, jproject, port, mode);
    runConfig.setVMArguments(execArgs.getVMArgumentsArray());
    runConfig.setWorkingDirectory(workingDirName);
    runConfig.setEnvironment(envp);

    Map vmAttributesMap = getVMSpecificAttributesMap(configuration);
    runConfig.setVMSpecificAttributesMap(vmAttributesMap);
View Full Code Here

    VMRunnerConfiguration vmConfig =
        new VMRunnerConfiguration(getMainTypeName(configuration), classPath);

    // insert the program arguments
    Vector<String> argv = new Vector<String>(10);
    ExecutionArguments execArgs = new ExecutionArguments("", progArgs); //$NON-NLS-1$
    String[] pa = execArgs.getProgramArgumentsArray();
    for (String element : pa) {
      argv.add(element);
    }

    // Use -serPort (serialized protocol) or -port (string protocol) based on
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.launching.ExecutionArguments

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.