use of org.eclipse.wst.xml.core.internal.contentmodel.CMDataType in project webtools.sourceediting by eclipse.
the class XMLGeneratorImpl method isBooleanAttr.
/**
*/
private boolean isBooleanAttr(Attr attr) {
if (attr == null)
return false;
CMAttributeDeclaration decl = CMNodeUtil.getAttributeDeclaration(attr);
if (decl == null)
return false;
CMDataType type = decl.getAttrType();
if (type == null)
return false;
String[] values = type.getEnumeratedValues();
if (values == null)
return false;
return (values.length == 1 && values[0].equals(decl.getAttrName()));
}
Aggregations