1 11 package org.eclipse.jdt.internal.codeassist.complete; 12 13 33 34 import org.eclipse.jdt.internal.compiler.ast.*; 35 import org.eclipse.jdt.internal.compiler.lookup.*; 36 37 public class CompletionOnSingleNameReference extends SingleNameReference { 38 39 public char[][] possibleKeywords; 40 public boolean canBeExplicitConstructor; 41 public boolean isInsideAnnotationAttribute; 42 43 public CompletionOnSingleNameReference(char[] source, long pos, boolean isInsideAnnotationAttribute) { 44 this(source, pos, null, false, isInsideAnnotationAttribute); 45 } 46 47 public CompletionOnSingleNameReference(char[] source, long pos, char[][] possibleKeywords, boolean canBeExplicitConstructor, boolean isInsideAnnotationAttribute) { 48 super(source, pos); 49 this.possibleKeywords = possibleKeywords; 50 this.canBeExplicitConstructor = canBeExplicitConstructor; 51 this.isInsideAnnotationAttribute = isInsideAnnotationAttribute; 52 } 53 54 public StringBuffer printExpression(int indent, StringBuffer output) { 55 56 output.append("<CompleteOnName:"); return super.printExpression(0, output).append('>'); 58 } 59 60 public TypeBinding resolveType(BlockScope scope) { 61 if(scope instanceof MethodScope) { 62 throw new CompletionNodeFound(this, scope, ((MethodScope)scope).insideTypeAnnotation); 63 } 64 throw new CompletionNodeFound(this, scope); 65 } 66 } 67 | Popular Tags |