// iterate existing attributes from current node
IDOMNode xmlNode = fModelUtil.getXMLNode(documentPosition);
if (xmlNode == null)
return false;
IStructuredDocumentRegion sdRegion = xmlNode.getFirstStructuredDocumentRegion();
ITextRegionList regions = sdRegion.getRegions();
ITextRegion r = null;
String attrName = ""; //$NON-NLS-1$
Object temp = null;
Position p = null;
HashMap map = ((AttributeContextInformation) fInfo).getAttr2RangeMap();
// so we can add ranges in order
StyleRange[] sorted = new StyleRange[fInfo.getInformationDisplayString().length()];
for (int i = 0; i < regions.size(); i++) {
r = regions.get(i);
if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
attrName = sdRegion.getText(r);
temp = map.get(attrName);
if (temp != null) {
p = (Position) temp;
sorted[p.offset] = new StyleRange(p.offset, p.length, null, null, SWT.BOLD);
}