/** * @return java.lang.String */ public String getString() { if (fCachedString == null) { StringBuffer buf = new StringBuffer(); Iterator i = getIterator(); while (i.hasNext()) { ICSSSelectorItem item = (ICSSSelectorItem) i.next(); if (item instanceof CSSSelectorCombinator) { // If item is DESCENDANT combinator, it is just single // space. // Then, you dont have to append string.. if (((CSSSelectorCombinator) item).getCombinatorType() != ICSSSelectorCombinator.DESCENDANT) { buf.append(" ");//$NON-NLS-1$ buf.append(item.getString()); } buf.append(" ");//$NON-NLS-1$ } else { buf.append(item.getString()); } } fCachedString = buf.toString(); } return fCachedString; }