for (int i = 0; i < styleNames.length; i++) { String styleName = styleNames[i]; if (!styleName.equals("default")) { Style style = styleSheet.getStyle( styleName ); processStyle( style, codeList, styleSheet ); } }  if (styleSheet.containsDynamicStyles()) { Style[] dynamicStyles = styleSheet.getDynamicStyles(); for (int i = 0; i < dynamicStyles.length; i++) { Style style = dynamicStyles[i]; processStyle( style, codeList, styleSheet ); } codeList.add("\tstatic { for (int i = 0; i < dynamicStyles.length; i++) { Style style = dynamicStyles[i]; codeList.add("\t\tstylesByName.put( \"" + style.getSelector() + "\", " + style.getStyleName() + "Style );"); } codeList.add("\t}"); }  Style focussedStyle = styleSheet.getStyle("focussed"); if (focussedStyle == null) { System.out.println("Warning: CSS-Style [focussed] not found, now using the default style instead. If you use Forms or Lists, you should define the style [focussed]."); codeList.add( STANDALONE_MODIFIER + "Style focussedStyle = defaultStyle;\t } else { processStyle( focussedStyle, codeList, styleSheet ); }  String[] code = (String[]) codeList.toArray( new String[ codeList.size()]); sourceCode.insert(code);
	public void convertStyleSheet( StringList sourceCode, StyleSheet styleSheet ) {		// search for the position to include the style-sheet definitions:		int index = -1;		while (sourceCode.next()) {			String line = sourceCode.getCurrent();			if (INCLUDE.equals(line)) {				index = sourceCode.getCurrentIndex() + 1;				break;			}		}		if (index == -1) {			throw new BuildException("Unable to modify SytleSheet.java, include point [" + INCLUDE + "] not found.");		}		// now insert all used style-definitions:		String[] styleNames = styleSheet.getUsedStyleNames();		// problem: could be that there are dependencies between styles...		// than the base style needs to be defined before the dependent style.	}