1 11 package org.eclipse.jdt.internal.codeassist.complete; 12 13 import org.eclipse.jdt.internal.compiler.ast.SingleTypeReference; 14 import org.eclipse.jdt.internal.compiler.lookup.Scope; 15 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding; 16 17 public class CompletionOnKeyword1 extends SingleTypeReference implements CompletionOnKeyword { 18 private char[][] possibleKeywords; 19 public boolean canCompleteEmptyToken; 20 21 public CompletionOnKeyword1(char[] token, long pos, char[] possibleKeyword) { 22 this(token, pos, new char[][]{possibleKeyword}); 23 } 24 public CompletionOnKeyword1(char[] token, long pos, char[][] possibleKeywords) { 25 super(token, pos); 26 this.possibleKeywords = possibleKeywords; 27 } 28 public boolean canCompleteEmptyToken() { 29 return this.canCompleteEmptyToken; 30 } 31 public char[] getToken() { 32 return token; 33 } 34 public char[][] getPossibleKeywords() { 35 return possibleKeywords; 36 } 37 public void aboutToResolve(Scope scope) { 38 getTypeBinding(scope); 39 } 40 protected TypeBinding getTypeBinding(Scope scope) { 41 throw new CompletionNodeFound(this, scope); 42 } 43 public StringBuffer printExpression(int indent, StringBuffer output){ 44 45 return output.append("<CompleteOnKeyword:").append(token).append('>'); } 47 } 48 | Popular Tags |