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 preinstall tag from xma-app.xml. It contains a version number, specifing the version of swt to use if allready installed.

public class SWTPreinstall {

version of swt to use if allready installed
    private String version;

Constructor, sets the version
    SWTPreinstall(String version) {

write this object to a xml print stream.

ps the PrintStream to write to
    public void writeXMLPrintStream ps ) {
        ps.print. + . );
        ps.print. + . );

returns the version string
    public String getVersion() {
        return ;

sets the version string
    public void setVersion(String version) {
        this. = version;

Converts the given version string to its directory representation. It simply replaces all dots with underscores.
    public static String toDirName(String version) {
        return version.replace('.','_');

Returns the version string in its directory representation. All dots are replaced by underscores.
    public String getVersionDir() {
        return .replace('.','_');
New to GrepCode? Check out our FAQ X