private static void appendStyles(Attributes attributes, String cssStyles) { if (cssStyles == null || cssStyles.length() == 0) { return; } String styles = attributes.getCssStyle(); if (styles == null) { attributes.setCssStyle(cssStyles); } else { if (styles.endsWith(";")) { // $NON-NLS-1$ styles += " "; // $NON-NLS-1$ } else { styles += "; "; // $NON-NLS-1$ } styles += cssStyles; attributes.setCssStyle(styles); } }