Search in sources :

Example 1 with IProcessorInvoker

use of org.eclipse.wst.xsl.jaxp.launching.IProcessorInvoker in project webtools.sourceediting by eclipse.

the class JAXPJavaLaunchConfigurationDelegate method getClasspath.

@Override
public String[] getClasspath(ILaunchConfiguration configuration) throws CoreException {
    // get the classpath defined by the user
    String[] userClasspath = super.getClasspath(configuration);
    // get the classpath required for the transformation
    IProcessorInvoker invoker = getProcessorInvokerDescriptor(configuration);
    List<String> invokerCP = new ArrayList<String>();
    for (String entry : invoker.getClasspathEntries()) {
        invokerCP.add(entry);
    }
    // add the debugger...
    IProcessorInstall install = getProcessorInstall(configuration, mode);
    if (ILaunchManager.DEBUG_MODE.equals(mode) && install.getDebugger() != null) {
        String[] jars = install.getDebugger().getClassPath();
        for (String jar : jars) {
            invokerCP.add(jar);
        }
    }
    String[] invokerClasspath = invokerCP.toArray(new String[0]);
    // add them together
    String[] classpath = new String[userClasspath.length + invokerClasspath.length];
    System.arraycopy(invokerClasspath, 0, classpath, 0, invokerClasspath.length);
    System.arraycopy(userClasspath, 0, classpath, invokerClasspath.length, userClasspath.length);
    return classpath;
}
Also used : IProcessorInvoker(org.eclipse.wst.xsl.jaxp.launching.IProcessorInvoker) ArrayList(java.util.ArrayList) IProcessorInstall(org.eclipse.wst.xsl.jaxp.launching.IProcessorInstall)

Example 2 with IProcessorInvoker

use of org.eclipse.wst.xsl.jaxp.launching.IProcessorInvoker in project webtools.sourceediting by eclipse.

the class XSLProcessorTab2 method performApply.

@Override
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
    super.performApply(configuration);
    IProcessorInvoker invoker = JAXPRuntime.getProcessorInvokers()[0];
    configuration.setAttribute(JAXPLaunchConfigurationConstants.INVOKER_DESCRIPTOR, invoker.getId());
}
Also used : IProcessorInvoker(org.eclipse.wst.xsl.jaxp.launching.IProcessorInvoker)

Example 3 with IProcessorInvoker

use of org.eclipse.wst.xsl.jaxp.launching.IProcessorInvoker in project webtools.sourceediting by eclipse.

the class JAXPJavaLaunchConfigurationDelegate method getProgramArguments.

@Override
public String getProgramArguments(ILaunchConfiguration configuration) throws CoreException {
    // classname, sourceurl, output file
    IProcessorInvoker invoker = getProcessorInvokerDescriptor(configuration);
    String clazz = invoker.getInvokerClassName();
    StringBuffer sb = new StringBuffer();
    sb.append(clazz);
    // $NON-NLS-1$
    sb.append(" ");
    // $NON-NLS-1$ //$NON-NLS-2$
    sb.append("\"" + getLaunchConfigFile().getAbsolutePath() + "\"");
    // $NON-NLS-1$
    sb.append(" ");
    // $NON-NLS-1$ //$NON-NLS-2$
    sb.append("\"" + launchHelper.getSource() + "\"");
    // $NON-NLS-1$
    sb.append(" ");
    // $NON-NLS-1$ //$NON-NLS-2$
    sb.append("\"" + launchHelper.getTarget().getAbsolutePath() + "\"");
    if (ILaunchManager.DEBUG_MODE.equals(mode)) {
        IProcessorInstall install = getProcessorInstall(configuration, mode);
        if (install.getDebugger() != null) {
            IDebugger debugger = install.getDebugger();
            String className = debugger.getClassName();
            // $NON-NLS-1$ //$NON-NLS-2$
            sb.append(" -debug ").append(className).append(" ");
            sb.append(launchHelper.getRequestPort());
            // $NON-NLS-1$
            sb.append(" ").append(launchHelper.getEventPort());
            // $NON-NLS-1$
            sb.append(" ").append(launchHelper.getGeneratePort());
        }
    }
    return sb.toString();
}
Also used : IProcessorInvoker(org.eclipse.wst.xsl.jaxp.launching.IProcessorInvoker) IProcessorInstall(org.eclipse.wst.xsl.jaxp.launching.IProcessorInstall) IDebugger(org.eclipse.wst.xsl.jaxp.launching.IDebugger)

Aggregations

IProcessorInvoker (org.eclipse.wst.xsl.jaxp.launching.IProcessorInvoker)3 IProcessorInstall (org.eclipse.wst.xsl.jaxp.launching.IProcessorInstall)2 ArrayList (java.util.ArrayList)1 IDebugger (org.eclipse.wst.xsl.jaxp.launching.IDebugger)1