*/
private IContextInformation[] getInfoForElement(IDOMNode node) {
IContextInformation[] results = EMPTY_CONTEXT_INFO;
CMElementDeclaration decl = fModelUtil.getModelQuery().getCMElementDeclaration((Element) node);
if (decl != null) {
CMNamedNodeMap attributes = decl.getAttributes();
CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl(attributes);
List nodes = ModelQueryUtil.getModelQuery(node.getOwnerDocument()).getAvailableContent((Element) node, decl, ModelQuery.INCLUDE_ATTRIBUTES);
for (int k = 0; k < nodes.size(); k++) {
CMNode cmnode = (CMNode) nodes.get(k);
if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
allAttributes.put(cmnode);
}
}
attributes = allAttributes;
String attrContextString = node.getNodeName();
StringBuffer attrInfo = new StringBuffer(" "); //$NON-NLS-1$
String name = ""; //$NON-NLS-1$
HashMap attrPosMap = new HashMap();
int pos = 0;
int length = 0;
int numPerLine = 8;
CMAttributeDeclaration[] sortedAttrs = getSortedAttributes(attributes);
for (int i = 0; i < sortedAttrs.length; i++) {
name = sortedAttrs[i].getAttrName();
length = name.length();
pos = attrInfo.length();
attrInfo.append(name);
if (sortedAttrs[i].getUsage() == CMAttributeDeclaration.REQUIRED) {
attrInfo.append("*"); //$NON-NLS-1$
length++;
}
if (i < attributes.getLength() - 1) {
attrInfo.append(" "); //$NON-NLS-1$
if ((i != 0) && (i % numPerLine == 0)) {
attrInfo.append("\n "); //$NON-NLS-1$
}
}