Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH . All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at Contributors: s IT Solutions AT Spardat GmbH - initial API and implementation /
 * @(#) $Id: 2084 2007-11-27 14:53:31Z s3460 $
This class represents the swt-description tag from xma-app.xml. It may contain an ordered list of prefered versions and a set of resources to download if none of the prefered versions is installed.

public class XMASWTDescription {

Ordered List of preinstalled swt-versions to use. Contains SWTPreinstall objects
    private List preinstalls = new ArrayList();

Map of resources to download if none of the preinstalls is found in the xma-installation. Contains XMAResource objects
    private HashMap resources = new HashMap();

Constructor, empty
    XMASWTDescription() {

write this object to a xml print stream.

ps the PrintStream to write to
    public void writeXMLPrintStream ps ) {
        for (Iterator iter = .iterator(); iter.hasNext();) {
            SWTPreinstall element = (SWTPreinstall);
            ps.print("   "); //$NON-NLS-1$
        for (Iterator iter = .values().iterator(); iter.hasNext();) {
            XMAResource element = (XMAResource);
            ps.print("   "); //$NON-NLS-1$

adds the given preinstall to the list preinstalls
    public void addPreinstall(SWTPreinstall preinstall) {

adds the given resource to the map resources
    public void addResourceXMAResource resoure ) {
        .putresoure.getHref_(), resoure);

returns the list of preinstalls, containing SWTPreinstall objects
    public List getPreinstalls() {
        return ;

returns the map of resources, containing XMAResource objects
    public HashMap getResources() {
        return ;
New to GrepCode? Check out our FAQ X