/**
* Index {@link FieldElement} references from {@link AngularPropertyElement}s.
*/
private void indexProperties(AngularPropertyElement[] properties) {
for (AngularPropertyElement property : properties) {
FieldElement field = property.getField();
if (field != null) {
int offset = property.getFieldNameOffset();
if (offset == -1) {
continue;
}
int length = field.getName().length();
Location location = new Location(property, offset, length);
// getter reference
if (property.getPropertyKind().callsGetter()) {
PropertyAccessorElement getter = field.getGetter();
if (getter != null) {
store.recordRelationship(getter, IndexConstants.IS_REFERENCED_BY_QUALIFIED, location);
}
}
// setter reference
if (property.getPropertyKind().callsSetter()) {
PropertyAccessorElement setter = field.getSetter();
if (setter != null) {
store.recordRelationship(setter, IndexConstants.IS_REFERENCED_BY_QUALIFIED, location);
}
}
}