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