result = getJavaMemberName();
setView(temp);
}
att = null;
} else if (_annotated.getStructureType() == Structure.ELEMENT) {
ElementDecl element = (ElementDecl) _annotated;
if (element.isReference()) {
temp = _annotated;
setView(element.getReference());
result = getJavaMemberName();
boolean userSpecified = _userSpecifiedMemberName;
setView(temp);
//-- there might be more than once reference, so we
//-- need to do a little counting here.
if (!userSpecified) {
String refName = element.getReferenceName();
int count = 0;
int index = 0;
Structure structure = element.getParent();
if (structure instanceof ContentModelGroup) {
ContentModelGroup cmg = (ContentModelGroup) structure;
Enumeration<Structure> enumeration = cmg.enumerate();
while (enumeration.hasMoreElements()) {
Structure tmpStruct = enumeration.nextElement();
if (tmpStruct.getStructureType() == Structure.ELEMENT) {
ElementDecl tmpDecl = (ElementDecl) tmpStruct;
if (tmpDecl.isReference()
&& tmpDecl.getReferenceName().equals(refName)) {
++count;
if (tmpDecl == element) {
index = count;
}
}