Search in sources :

Example 1 with LaunchProperties

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

the class LaunchHelper method hydrateOutputProperties.

public static LaunchProperties hydrateOutputProperties(ILaunchConfiguration configuration) throws CoreException {
    LaunchProperties properties = new LaunchProperties();
    // configuration.getAttribute(JAXPLaunchConfigurationConstants.ATTR_USE_PROPERTIES_FROM_PREFERENCES,
    boolean usePreferenceProperties = false;
    // true);
    IProcessorType pt = getProcessorInstall(configuration).getProcessorType();
    if (usePreferenceProperties) {
        for (Map.Entry<String, String> entry : pt.getOutputPropertyValues().entrySet()) {
            String name = entry.getKey();
            String value = entry.getValue();
            properties.setProperty(name, value);
        }
    } else {
        String s = configuration.getAttribute(JAXPLaunchConfigurationConstants.ATTR_OUTPUT_PROPERTIES, (String) null);
        if (s != null && s.length() > 0) {
            ByteArrayInputStream inputStream = new ByteArrayInputStream(s.getBytes());
            properties = LaunchProperties.fromXML(inputStream);
        }
    }
    return properties;
}
Also used : LaunchProperties(org.eclipse.wst.xsl.jaxp.launching.LaunchProperties) ByteArrayInputStream(java.io.ByteArrayInputStream) IProcessorType(org.eclipse.wst.xsl.jaxp.launching.IProcessorType) Map(java.util.Map)

Example 2 with LaunchProperties

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

the class OutputPropertiesBlock method initializePropertiesFromStorage.

private void initializePropertiesFromStorage(ILaunchConfiguration configuration) throws CoreException {
    String s = configuration.getAttribute(JAXPLaunchConfigurationConstants.ATTR_OUTPUT_PROPERTIES, (String) null);
    if (s != null && s.length() > 0) {
        properties = LaunchProperties.fromXML(new ByteArrayInputStream(s.getBytes()));
    } else {
        properties = new LaunchProperties();
    }
    tViewer.setInput(properties);
    updateRemoveButton();
}
Also used : LaunchProperties(org.eclipse.wst.xsl.jaxp.launching.LaunchProperties) ByteArrayInputStream(java.io.ByteArrayInputStream)

Aggregations

ByteArrayInputStream (java.io.ByteArrayInputStream)2 LaunchProperties (org.eclipse.wst.xsl.jaxp.launching.LaunchProperties)2 Map (java.util.Map)1 IProcessorType (org.eclipse.wst.xsl.jaxp.launching.IProcessorType)1