use of org.eclipse.wst.xsl.jaxp.launching.IProcessorInstall in project webtools.sourceediting by eclipse.
the class JAXPJavaLaunchConfigurationDelegate method getProcessorInstall.
public static IProcessorInstall getProcessorInstall(ILaunchConfiguration configuration, String mode) throws CoreException {
IProcessorInstall install = LaunchHelper.getProcessorInstall(configuration);
if (mode.equals(ILaunchManager.DEBUG_MODE) && install.getDebugger() == null) {
String debuggingInstallId = JAXPLaunchingPlugin.getDefault().getPluginPreferences().getString(JAXPLaunchConfigurationConstants.ATTR_DEFAULT_DEBUGGING_INSTALL_ID);
install = JAXPRuntime.getProcessor(debuggingInstallId);
}
return install;
}
use of org.eclipse.wst.xsl.jaxp.launching.IProcessorInstall 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();
}
use of org.eclipse.wst.xsl.jaxp.launching.IProcessorInstall in project webtools.sourceediting by eclipse.
the class LaunchHelper method getProcessorInstall.
public static IProcessorInstall getProcessorInstall(ILaunchConfiguration configuration) throws CoreException {
boolean useDefaultProcessor = configuration.getAttribute(JAXPLaunchConfigurationConstants.ATTR_USE_DEFAULT_PROCESSOR, true);
if (useDefaultProcessor)
return JAXPRuntime.getDefaultProcessor();
String processorId = configuration.getAttribute(JAXPLaunchConfigurationConstants.ATTR_PROCESSOR, // $NON-NLS-1$
"");
IProcessorInstall processor = JAXPRuntime.getProcessor(processorId);
return processor;
}
use of org.eclipse.wst.xsl.jaxp.launching.IProcessorInstall in project webtools.sourceediting by eclipse.
the class ProcessorPreferences method fromXML.
public static ProcessorPreferences fromXML(InputStream inputStream) throws CoreException {
ProcessorPreferences prefs = new ProcessorPreferences();
Document doc = PreferenceUtil.getDocument(inputStream);
Element config = doc.getDocumentElement();
// Populate the default VM-related fields
// $NON-NLS-1$
prefs.setDefaultProcessorId(config.getAttribute("defaultProcessor"));
List<IProcessorInstall> processors = new ArrayList<IProcessorInstall>();
// Traverse the parsed structure and populate the VMType to VM Map
// $NON-NLS-1$
Element[] processorEls = PreferenceUtil.getChildElements(config, "processor");
for (int i = 0; i < processorEls.length; ++i) {
IProcessorInstall processor = elementAsInstall(processorEls[i]);
processors.add(processor);
}
prefs.setProcessors(processors);
return prefs;
}
use of org.eclipse.wst.xsl.jaxp.launching.IProcessorInstall in project webtools.sourceediting by eclipse.
the class ProcessorPreferences method elementAsInstall.
private static IProcessorInstall elementAsInstall(Element parent) {
// $NON-NLS-1$
String id = parent.getAttribute("id");
// $NON-NLS-1$
String label = parent.getAttribute("label");
// $NON-NLS-1$
String typeId = parent.getAttribute("type");
// $NON-NLS-1$
String supports = parent.getAttribute("supports");
// $NON-NLS-1$
String debuggerId = parent.getAttribute("debuggerId");
IProcessorJar[] jars = null;
// $NON-NLS-1$
Element[] jarsEls = PreferenceUtil.getChildElements(parent, "jars");
if (jarsEls.length == 1) {
jars = elementAsJars(jarsEls[0]);
}
IProcessorInstall install = new ProcessorInstall(id, label, typeId, jars, debuggerId, supports, false);
return install;
}
Aggregations