use of org.eclipse.wst.css.core.internal.metamodel.CSSMMNode in project webtools.sourceediting by eclipse.
the class CSSMetaModelImpl method getCategories.
public Iterator getCategories() {
List categories = new ArrayList();
Iterator i = getChildNodes();
while (i.hasNext()) {
CSSMMNode node = (CSSMMNode) i.next();
if (node.getType() == TYPE_CATEGORY) {
categories.add(node);
}
}
return categories.iterator();
}
use of org.eclipse.wst.css.core.internal.metamodel.CSSMMNode in project webtools.sourceediting by eclipse.
the class CSSMetaModelTest method testCursorPropertyValues2r1.
public void testCursorPropertyValues2r1() {
CSSMetaModel model = CSSProfileRegistry.getInstance().getDefaultProfile().getMetaModel();
if (model != null) {
CSSMetaModelUtil util = new CSSMetaModelUtil(model);
CSSMMProperty property = util.getProperty(PropCMProperty.P_CURSOR);
Iterator it = property.getValues();
Set set = new HashSet(1);
set.add(IValID.V_PROGRESS);
while (it.hasNext()) {
CSSMMNode node = (CSSMMNode) it.next();
if (set.contains(node.getName())) {
assertEquals("Property should be a keyword", CSSMMNode.TYPE_KEYWORD, node.getType());
set.remove(node.getName());
}
}
assertTrue("The content property is missing values added for CSS 2 revision 1.", set.isEmpty());
}
}
use of org.eclipse.wst.css.core.internal.metamodel.CSSMMNode in project webtools.sourceediting by eclipse.
the class CSSMetaModelTest method testContentPropertyValues2r1.
public void testContentPropertyValues2r1() {
CSSMetaModel model = CSSProfileRegistry.getInstance().getDefaultProfile().getMetaModel();
if (model != null) {
CSSMetaModelUtil util = new CSSMetaModelUtil(model);
CSSMMProperty property = util.getProperty(PropCMProperty.P_CONTENT);
Iterator it = property.getValues();
Set set = new HashSet(2);
set.add(IValID.V_NORMAL);
set.add(IValID.V_NONE);
while (it.hasNext()) {
CSSMMNode node = (CSSMMNode) it.next();
if (set.contains(node.getName())) {
assertEquals("Property should be a keyword", CSSMMNode.TYPE_KEYWORD, node.getType());
set.remove(node.getName());
}
}
assertTrue("The content property is missing values added for CSS 2 revision 1.", set.isEmpty());
}
}
use of org.eclipse.wst.css.core.internal.metamodel.CSSMMNode in project webtools.sourceediting by eclipse.
the class CSSMetaModelTest method testColorPropertyValues2r1.
public void testColorPropertyValues2r1() {
CSSMetaModel model = CSSProfileRegistry.getInstance().getDefaultProfile().getMetaModel();
if (model != null) {
CSSMetaModelUtil util = new CSSMetaModelUtil(model);
CSSMMProperty property = util.getProperty(PropCMProperty.P_COLOR);
Iterator it = property.getValues();
Set set = new HashSet(1);
set.add(IValID.V_ORANGE);
while (it.hasNext()) {
CSSMMNode node = (CSSMMNode) it.next();
if (set.contains(node.getName())) {
assertEquals("Property should be a keyword", CSSMMNode.TYPE_KEYWORD, node.getType());
set.remove(node.getName());
}
}
assertTrue("The content property is missing values added for CSS 2 revision 1.", set.isEmpty());
}
}
Aggregations