lines.insert( "\tStyleSheet.currentStyle = StyleSheet." + style + "Style;"  );
if (this.useDefaultPackage) { lines.insert( "\tStyleSheet.currentStyle = StyleSheet." + style + "Style;"  ); } else { lines.insert( "\tde.enough.polish.ui.StyleSheet.currentStyle = de.enough.polish.ui.StyleSheet." + style + "Style;"  ); }
	private boolean processStyle(String styleNames, StringList lines, String className) 	throws BuildException	{		if (!this.usePolishGui) {			return false;		}		int styleDirectiveLine = lines.getCurrentIndex() + 1;		if (this.styleSheet == null) {			throw new BuildException(					className + " line " + styleDirectiveLine					+ ": unable to process #style directive: no style-sheet found. Please create [resources/polish.css].");		}		// get the style-name:		String[] styles = StringUtil.splitAndTrim(styleNames, ',');		String style = null;		for (int i = 0; i < styles.length; i++) {			String name = styles[i].toLowerCase();			if (name.charAt(0) == '.') {				name = name.substring( 1 );			}			if (this.styleSheet.isDefined(name)) {				style = name;				break;			}		}		if (style == null) {			String message;			if (styles.length == 1) {				message = "the style [" + styleNames + "] is not defined. Please define the style in the appropriate polish.css file.";			} else {				message = "none of the styles [" + styleNames + "] is defined. Please define at least one of the styles in the appropriate polish.css file.";			}			throw new BuildException(					className + " line " + styleDirectiveLine					+ ": unable to process #style directive: " + message );		}		// when the #style directive is followed by a new operator, then		// the defined style will be included as last argument in the new operator,		// otherwise the defined style will be set as the current style in the stylesheet:		String nextLine = null;		if (lines.next()) {			nextLine = lines.getCurrent();			String trimmed = nextLine.trim(); 			if ( trimmed.startsWith("//#=") ) {				processSingleLine(className, lines, nextLine, trimmed);				nextLine = lines.getCurrent();			}		}		// get the statement which follows the #style-directive and		// which is closed by a semicolon:		if ( nextLine != null ) {			uncommentLine( nextLine, lines );			while ( nextLine.indexOf(';') == -1) {				if (!lines.next()) {					throw new BuildException(							className + " line " + styleDirectiveLine							+ ": unable to process #style directive: there is a new operator without closing semicolon in the following line(s)."							);				}				if ( containsDirective( nextLine) ) {					throw new BuildException(							className + " line " + styleDirectiveLine							+ ": unable to process #style directive: there is a new operator without closing semicolon in the following line(s)."					);				}				nextLine = lines.getCurrent();								uncommentLine( nextLine, lines );			}			// get uncommented line:			nextLine = lines.getCurrent();			int parenthesisPos = nextLine.lastIndexOf(')');			if ( parenthesisPos == -1 ) {				throw new BuildException(						className + " line " + styleDirectiveLine						+ ": unable to process #style directive: the statement which follows the #style directive must be closed by a parenthesis and a semicolon on the same line: [);]. "  				);			}			// append the style-parameter as the last argument:			StringBuffer buffer = new StringBuffer();			buffer.append( nextLine.substring(0, parenthesisPos ) );			int openingParenthesisPos = nextLine.lastIndexOf('(');			if (openingParenthesisPos != parenthesisPos -1 ) {				buffer.append(", ");			} 			buffer.append( "StyleSheet." )					.append( style )					.append( "Style " )					.append( nextLine.substring( parenthesisPos ) );			lines.setCurrent( buffer.toString() );		} else { // either there is no next line or the next line has no new operator			lines.prev();			lines.insert( "\tStyleSheet.currentStyle = StyleSheet." + style + "Style;"  );		}		// mark the style as beeing used:		this.styleSheet.addUsedStyle( style );		return true;	}