use of org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorItem in project webtools.sourceediting by eclipse.
the class CSSSelectorTest method testSelector39.
public void testSelector39() {
ICSSSelectorList list = createSelectorList(".123f567");
checkSelectorList(list, ".123f567", 1, 1);
ICSSSelector selector;
ICSSSelectorItem item;
selector = list.getSelector(0);
checkSelector(selector, ".123f567", 1, 100, 1);
item = selector.getItem(0);
checkSimpleSelector(item, "", true, 0, 1, 0, 0);
checkSimpleSelectorClasses(item, new String[] { "123f567" });
}
use of org.eclipse.wst.css.core.internal.provisional.document.ICSSSelectorItem in project webtools.sourceediting by eclipse.
the class CSSSelector method getString.
/**
* @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) {
// Then, you dont have to append string..
if (((CSSSelectorCombinator) item).getCombinatorType() != ICSSSelectorCombinator.DESCENDANT) {
// $NON-NLS-1$
buf.append(" ");
buf.append(item.getString());
}
// $NON-NLS-1$
buf.append(" ");
} else {
buf.append(item.getString());
}
}
fCachedString = buf.toString();
}
return fCachedString;
}
Aggregations