public int resolveLevel(Binding binding) { if (binding == null) return INACCURATE_MATCH; if (!(binding instanceof FieldBinding)) return IMPOSSIBLE_MATCH; return matchField((FieldBinding) binding, true); } protected int resolveLevel(NameReference nameRef) {
public int resolveLevel(Binding binding) { if (binding == null) return INACCURATE_MATCH; if (!(binding instanceof FieldBinding)) return IMPOSSIBLE_MATCH; return matchField((FieldBinding) binding, true); } protected int resolveLevel(NameReference nameRef) {
@Override public int resolveLevel(Binding binding) { if (binding == null) return INACCURATE_MATCH; if (!(binding instanceof FieldBinding)) return IMPOSSIBLE_MATCH; return matchField((FieldBinding) binding, true); } protected int resolveLevel(NameReference nameRef) {
public int resolveLevel(Binding binding) { if (binding == null) return INACCURATE_MATCH; if (!(binding instanceof FieldBinding)) return IMPOSSIBLE_MATCH; return matchField((FieldBinding) binding, true); } protected int resolveLevel(NameReference nameRef) {
public int resolveLevel(Binding binding) { if (binding == null) return INACCURATE_MATCH; if (!(binding instanceof FieldBinding)) return IMPOSSIBLE_MATCH; return matchField((FieldBinding) binding, true); } protected int resolveLevel(NameReference nameRef) {
public int resolveLevel(Binding binding) { if (binding == null) return INACCURATE_MATCH; if (!(binding instanceof FieldBinding)) return IMPOSSIBLE_MATCH; return matchField((FieldBinding) binding, true); } protected int resolveLevel(NameReference nameRef) {
public int resolveLevel(ASTNode possiblelMatchingNode) { if (this.pattern.findReferences || this.pattern.fineGrain != 0) { if (possiblelMatchingNode instanceof FieldReference) return matchField(((FieldReference) possiblelMatchingNode).binding, true); else if (possiblelMatchingNode instanceof NameReference) return resolveLevel((NameReference) possiblelMatchingNode); } if (possiblelMatchingNode instanceof FieldDeclaration) return matchField(((FieldDeclaration) possiblelMatchingNode).binding, true); return IMPOSSIBLE_MATCH; } public int resolveLevel(Binding binding) {
public int resolveLevel(ASTNode possiblelMatchingNode) { if (this.pattern.findReferences || this.pattern.fineGrain != 0) { if (possiblelMatchingNode instanceof FieldReference) return matchField(((FieldReference) possiblelMatchingNode).binding, true); else if (possiblelMatchingNode instanceof NameReference) return resolveLevel((NameReference) possiblelMatchingNode); } if (possiblelMatchingNode instanceof FieldDeclaration) return matchField(((FieldDeclaration) possiblelMatchingNode).binding, true); return IMPOSSIBLE_MATCH; } public int resolveLevel(Binding binding) {
public int resolveLevel(ASTNode possiblelMatchingNode) { if (this.pattern.findReferences || this.pattern.fineGrain != 0) { if (possiblelMatchingNode instanceof FieldReference) return matchField(((FieldReference) possiblelMatchingNode).binding, true); else if (possiblelMatchingNode instanceof NameReference) return resolveLevel((NameReference) possiblelMatchingNode); } if (possiblelMatchingNode instanceof FieldDeclaration) return matchField(((FieldDeclaration) possiblelMatchingNode).binding, true); return IMPOSSIBLE_MATCH; } public int resolveLevel(Binding binding) {
public int resolveLevel(ASTNode possiblelMatchingNode) { if (this.pattern.findReferences || this.pattern.fineGrain != 0) { if (possiblelMatchingNode instanceof FieldReference) return matchField(((FieldReference) possiblelMatchingNode).binding, true); else if (possiblelMatchingNode instanceof NameReference) return resolveLevel((NameReference) possiblelMatchingNode); } if (possiblelMatchingNode instanceof FieldDeclaration) return matchField(((FieldDeclaration) possiblelMatchingNode).binding, true); return IMPOSSIBLE_MATCH; } public int resolveLevel(Binding binding) {
@Override public int resolveLevel(ASTNode possiblelMatchingNode) { if (this.pattern.findReferences || this.pattern.fineGrain != 0) { if (possiblelMatchingNode instanceof FieldReference) return matchField(((FieldReference) possiblelMatchingNode).binding, true); else if (possiblelMatchingNode instanceof NameReference) return resolveLevel((NameReference) possiblelMatchingNode); } if (possiblelMatchingNode instanceof FieldDeclaration) return matchField(((FieldDeclaration) possiblelMatchingNode).binding, true); return IMPOSSIBLE_MATCH; } @Override
public int resolveLevel(ASTNode possiblelMatchingNode) { if (this.pattern.findReferences || this.pattern.fineGrain != 0) { if (possiblelMatchingNode instanceof FieldReference) return matchField(((FieldReference) possiblelMatchingNode).binding, true); else if (possiblelMatchingNode instanceof NameReference) return resolveLevel((NameReference) possiblelMatchingNode); } if (possiblelMatchingNode instanceof FieldDeclaration) return matchField(((FieldDeclaration) possiblelMatchingNode).binding, true); return IMPOSSIBLE_MATCH; } public int resolveLevel(Binding binding) {
protected int resolveLevel(NameReference nameRef) { if (nameRef instanceof SingleNameReference) return resolveLevel(nameRef.binding); Binding binding = nameRef.binding; QualifiedNameReference qNameRef = (QualifiedNameReference) nameRef; FieldBinding fieldBinding = null; if (binding instanceof FieldBinding) { fieldBinding = (FieldBinding) binding; char[] bindingName = fieldBinding.name; int lastDot = CharOperation.lastIndexOf('.', bindingName); if (lastDot > -1) bindingName = CharOperation.subarray(bindingName, lastDot+1, bindingName.length); if (matchesName(this.pattern.name, bindingName)) { int level = matchField(fieldBinding, false); if (level != IMPOSSIBLE_MATCH) return level; } } int otherMax = qNameRef.otherBindings == null ? 0 : qNameRef.otherBindings.length; for (int i = 0; i < otherMax; i++) { char[] token = qNameRef.tokens[i + qNameRef.indexOfFirstFieldBinding]; if (matchesName(this.pattern.name, token)) { FieldBinding otherBinding = qNameRef.otherBindings[i]; int level = matchField(otherBinding, false); if (level != IMPOSSIBLE_MATCH) return level; } } return IMPOSSIBLE_MATCH; } /* (non-Javadoc)
protected int resolveLevel(NameReference nameRef) { if (nameRef instanceof SingleNameReference) return resolveLevel(nameRef.binding); Binding binding = nameRef.binding; QualifiedNameReference qNameRef = (QualifiedNameReference) nameRef; FieldBinding fieldBinding = null; if (binding instanceof FieldBinding) { fieldBinding = (FieldBinding) binding; char[] bindingName = fieldBinding.name; int lastDot = CharOperation.lastIndexOf('.', bindingName); if (lastDot > -1) bindingName = CharOperation.subarray(bindingName, lastDot+1, bindingName.length); if (matchesName(this.pattern.name, bindingName)) { int level = matchField(fieldBinding, false); if (level != IMPOSSIBLE_MATCH) return level; } } int otherMax = qNameRef.otherBindings == null ? 0 : qNameRef.otherBindings.length; for (int i = 0; i < otherMax; i++) { char[] token = qNameRef.tokens[i + qNameRef.indexOfFirstFieldBinding]; if (matchesName(this.pattern.name, token)) { FieldBinding otherBinding = qNameRef.otherBindings[i]; int level = matchField(otherBinding, false); if (level != IMPOSSIBLE_MATCH) return level; } } return IMPOSSIBLE_MATCH; } /* (non-Javadoc)
protected int resolveLevel(NameReference nameRef) { if (nameRef instanceof SingleNameReference) return resolveLevel(nameRef.binding); Binding binding = nameRef.binding; QualifiedNameReference qNameRef = (QualifiedNameReference) nameRef; FieldBinding fieldBinding = null; if (binding instanceof FieldBinding) { fieldBinding = (FieldBinding) binding; char[] bindingName = fieldBinding.name; int lastDot = CharOperation.lastIndexOf('.', bindingName); if (lastDot > -1) bindingName = CharOperation.subarray(bindingName, lastDot+1, bindingName.length); if (matchesName(this.pattern.name, bindingName)) { int level = matchField(fieldBinding, false); if (level != IMPOSSIBLE_MATCH) return level; } } int otherMax = qNameRef.otherBindings == null ? 0 : qNameRef.otherBindings.length; for (int i = 0; i < otherMax; i++) { char[] token = qNameRef.tokens[i + qNameRef.indexOfFirstFieldBinding]; if (matchesName(this.pattern.name, token)) { FieldBinding otherBinding = qNameRef.otherBindings[i]; int level = matchField(otherBinding, false); if (level != IMPOSSIBLE_MATCH) return level; } } return IMPOSSIBLE_MATCH; } /* (non-Javadoc)
protected int resolveLevel(NameReference nameRef) { if (nameRef instanceof SingleNameReference) return resolveLevel(nameRef.binding); Binding binding = nameRef.binding; QualifiedNameReference qNameRef = (QualifiedNameReference) nameRef; FieldBinding fieldBinding = null; if (binding instanceof FieldBinding) { fieldBinding = (FieldBinding) binding; char[] bindingName = fieldBinding.name; int lastDot = CharOperation.lastIndexOf('.', bindingName); if (lastDot > -1) bindingName = CharOperation.subarray(bindingName, lastDot+1, bindingName.length); if (matchesName(this.pattern.name, bindingName)) { int level = matchField(fieldBinding, false); if (level != IMPOSSIBLE_MATCH) return level; } } int otherMax = qNameRef.otherBindings == null ? 0 : qNameRef.otherBindings.length; for (int i = 0; i < otherMax; i++) { char[] token = qNameRef.tokens[i + qNameRef.indexOfFirstFieldBinding]; if (matchesName(this.pattern.name, token)) { FieldBinding otherBinding = qNameRef.otherBindings[i]; int level = matchField(otherBinding, false); if (level != IMPOSSIBLE_MATCH) return level; } } return IMPOSSIBLE_MATCH; } /* (non-Javadoc)
protected int resolveLevel(NameReference nameRef) { if (nameRef instanceof SingleNameReference) return resolveLevel(nameRef.binding); Binding binding = nameRef.binding; QualifiedNameReference qNameRef = (QualifiedNameReference) nameRef; FieldBinding fieldBinding = null; if (binding instanceof FieldBinding) { fieldBinding = (FieldBinding) binding; char[] bindingName = fieldBinding.name; int lastDot = CharOperation.lastIndexOf('.', bindingName); if (lastDot > -1) bindingName = CharOperation.subarray(bindingName, lastDot+1, bindingName.length); if (matchesName(this.pattern.name, bindingName)) { int level = matchField(fieldBinding, false); if (level != IMPOSSIBLE_MATCH) return level; } } int otherMax = qNameRef.otherBindings == null ? 0 : qNameRef.otherBindings.length; for (int i = 0; i < otherMax; i++) { char[] token = qNameRef.tokens[i + qNameRef.indexOfFirstFieldBinding]; if (matchesName(this.pattern.name, token)) { FieldBinding otherBinding = qNameRef.otherBindings[i]; int level = matchField(otherBinding, false); if (level != IMPOSSIBLE_MATCH) return level; } } return IMPOSSIBLE_MATCH; } /* (non-Javadoc)
protected int resolveLevel(NameReference nameRef) { if (nameRef instanceof SingleNameReference) return resolveLevel(nameRef.binding); Binding binding = nameRef.binding; QualifiedNameReference qNameRef = (QualifiedNameReference) nameRef; FieldBinding fieldBinding = null; if (binding instanceof FieldBinding) { fieldBinding = (FieldBinding) binding; char[] bindingName = fieldBinding.name; int lastDot = CharOperation.lastIndexOf('.', bindingName); if (lastDot > -1) bindingName = CharOperation.subarray(bindingName, lastDot+1, bindingName.length); if (matchesName(this.pattern.name, bindingName)) { int level = matchField(fieldBinding, false); if (level != IMPOSSIBLE_MATCH) return level; } } int otherMax = qNameRef.otherBindings == null ? 0 : qNameRef.otherBindings.length; for (int i = 0; i < otherMax; i++) { char[] token = qNameRef.tokens[i + qNameRef.indexOfFirstFieldBinding]; if (matchesName(this.pattern.name, token)) { FieldBinding otherBinding = qNameRef.otherBindings[i]; int level = matchField(otherBinding, false); if (level != IMPOSSIBLE_MATCH) return level; } } return IMPOSSIBLE_MATCH; } /* (non-Javadoc)
matches[indexOfFirstFieldBinding] = locator.newFieldReferenceMatch(element, localElement, elementBinding, accuracy, -1, -1, reference); } else { switch (matchField(fieldBinding, false)) { case ACCURATE_MATCH: matches[indexOfFirstFieldBinding] = locator.newFieldReferenceMatch(element, localElement, elementBinding, SearchMatch.A_ACCURATE, -1, -1, reference); matches[i] = locator.newFieldReferenceMatch(element, localElement, elementBinding, accuracy, -1, -1, reference); } else { switch (matchField(otherBinding, false)) { case ACCURATE_MATCH: matches[i] = locator.newFieldReferenceMatch(element, localElement, elementBinding, SearchMatch.A_ACCURATE, -1, -1, reference);
matches[indexOfFirstFieldBinding] = locator.newFieldReferenceMatch(element, localElement, elementBinding, accuracy, -1, -1, reference); } else { switch (matchField(fieldBinding, false)) { case ACCURATE_MATCH: matches[indexOfFirstFieldBinding] = locator.newFieldReferenceMatch(element, localElement, elementBinding, SearchMatch.A_ACCURATE, -1, -1, reference); matches[i] = locator.newFieldReferenceMatch(element, localElement, elementBinding, accuracy, -1, -1, reference); } else { switch (matchField(otherBinding, false)) { case ACCURATE_MATCH: matches[i] = locator.newFieldReferenceMatch(element, localElement, elementBinding, SearchMatch.A_ACCURATE, -1, -1, reference);