try {
if (superField) {
// begin lookup in superclass
ref = ((ClassType) ref).superclass();
}
Field field = ref.fieldByName(name);
if (field != null) {
return new JDIFieldVariable((JDIDebugTarget) getDebugTarget(),
field, getUnderlyingObject(), fLogicalParent);
}
Field enclosingThis = null;
Iterator<Field> fields = ref.fields().iterator();
while (fields.hasNext()) {
Field fieldTmp = fields.next();
if (fieldTmp.name().startsWith("this$")) { //$NON-NLS-1$
enclosingThis = fieldTmp;
break;
}
}