if (childResolver == null) {
childResolver = new StateFieldResolver(resolver, path);
resolver.addChild(path, childResolver);
}
IMapping mapping = childResolver.getMapping();
// Invalid path expression
if (mapping == null) {
break;
}
// The name matches
if (mapping.getName().equals(oldAttributeName)) {
// Make sure the field name is from the right type
String parentTypeName = mapping.getParent().getType().getName();
if (parentTypeName.equals(typeName)) {
int extraOffset = expression.toParsedText(0, index).length() + 1 /* '.' */;
addTextEdit(expression, extraOffset, oldAttributeName, newAttributeName);
break;