public static boolean isNumber(Object cssValue) { return cssValue instanceof ICSSPrimitiveValue && ((ICSSPrimitiveValue) cssValue).getPrimitiveType() == ICSSPrimitiveValue.CSS_INTEGER; } }
public static boolean isIdentifier(Object cssValue) { return (cssValue instanceof ICSSPrimitiveValue) && ((ICSSPrimitiveValue) cssValue).getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT; }
/** * */ public boolean toAbsolute(CSSValue node) { if (node instanceof ICSSPrimitiveValue) { ICSSPrimitiveValue value = (ICSSPrimitiveValue) node; if (value.getPrimitiveType() == CSSPrimitiveValue.CSS_URI) { value.setValue(stripFunc(toAbsolute(URL_BEGIN + value.getStringValue() + URL_END))); return true; } } return false; } }
if (((ICSSPrimitiveValue) child).getPrimitiveType() == ICSSPrimitiveValue.CSS_COMMA) toAppend = ",";//$NON-NLS-1$ else if (((ICSSPrimitiveValue) child).getPrimitiveType() == ICSSPrimitiveValue.CSS_SLASH) toAppend = "/";//$NON-NLS-1$
case ICSSNode.PRIMITIVEVALUE_NODE : ICSSPrimitiveValue value = (ICSSPrimitiveValue) node; if (value.getPrimitiveType() == org.w3c.dom.css.CSSPrimitiveValue.CSS_COUNTER) return CounterFormatter.getInstance(); else if (value.getPrimitiveType() == org.w3c.dom.css.CSSPrimitiveValue.CSS_RECT) return RectFormatter.getInstance(); else if (value.getPrimitiveType() == org.w3c.dom.css.CSSPrimitiveValue.CSS_RGBCOLOR) return RGBFormatter.getInstance(); else
if (value.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) { ICSSPrimitiveValue prim = (ICSSPrimitiveValue) value; if (prim.getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT) {
if (value.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) { ICSSPrimitiveValue prim = (ICSSPrimitiveValue) value; if (prim.getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT) {
short type = value.getPrimitiveType(); String quote = preferences.getString(CSSCorePreferenceNames.FORMAT_QUOTE);