1 11 package org.eclipse.jdt.internal.codeassist.select; 12 13 31 32 import org.eclipse.jdt.internal.compiler.ast.FieldReference; 33 import org.eclipse.jdt.internal.compiler.lookup.BlockScope; 34 import org.eclipse.jdt.internal.compiler.lookup.ProblemReasons; 35 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding; 36 37 public class SelectionOnFieldReference extends FieldReference { 38 39 public SelectionOnFieldReference(char[] source , long pos) { 40 41 super(source, pos); 42 } 43 44 public StringBuffer printExpression(int indent, StringBuffer output){ 45 46 output.append("<SelectionOnFieldReference:"); return super.printExpression(0, output).append('>'); 48 } 49 50 public TypeBinding resolveType(BlockScope scope) { 51 52 super.resolveType(scope); 53 if (binding == null || 55 !(binding.isValidBinding() || 56 binding.problemId() == ProblemReasons.NotVisible 57 || binding.problemId() == ProblemReasons.InheritedNameHidesEnclosingName 58 || binding.problemId() == ProblemReasons.NonStaticReferenceInConstructorInvocation 59 || binding.problemId() == ProblemReasons.NonStaticReferenceInStaticContext)) 60 throw new SelectionNodeFound(); 61 else 62 throw new SelectionNodeFound(binding); 63 } 64 } 65 | Popular Tags |