org.eclipse.jdt.internal.codeassist.impl
Class AssistParser

java.lang.Object
  extended by org.eclipse.jdt.internal.compiler.parser.Parser
      extended by org.eclipse.jdt.internal.codeassist.impl.AssistParser
All Implemented Interfaces:
OperatorIds, TypeIds, ParserBasicInformation, TerminalTokens
Direct Known Subclasses:
CompletionParser, SelectionParser

public abstract class AssistParser
extends Parser


Field Summary
 ASTNode assistNode
           
 boolean isOrphanCompletionNode
           
 
Fields inherited from class org.eclipse.jdt.internal.compiler.parser.Parser
asb, asr, base_action, BracketKinds, check_table, compilationUnit, CurlyBracket, currentToken, firstToken, in_symb, javadoc, javadocParser, lastAct, lhs, methodRecoveryActivated, name, nasb, nasr, non_terminal_index, readableName, readManager, recovery_templates, recovery_templates_index, recoveryScanner, referenceContext, reportOnlyOneSyntaxError, reportSyntaxErrorIsRequired, reverse_index, rhs, RoundBracket, rules_compliance, scanner, scope_la, scope_lhs, scope_prefix, scope_rhs, scope_state, scope_state_set, scope_suffix, SquareBracket, statements_recovery_filter, term_action, term_check, terminal_index, VERBOSE_RECOVERY
 
Fields inherited from interface org.eclipse.jdt.internal.compiler.parser.ParserBasicInformation
ACCEPT_ACTION, EOFT_SYMBOL, EOLT_SYMBOL, ERROR_ACTION, ERROR_SYMBOL, LA_STATE_OFFSET, MAX_LA, MAX_NAME_LENGTH, NT_OFFSET, NUM_NON_TERMINALS, NUM_RULES, NUM_STATES, NUM_SYMBOLS, NUM_TERMINALS, SCOPE_SIZE, SCOPE_UBOUND, START_STATE
 
Fields inherited from interface org.eclipse.jdt.internal.compiler.parser.TerminalTokens
TokenNameabstract, TokenNamealso, TokenNameAND, TokenNameAND_AND, TokenNameAND_EQUAL, TokenNameassert, TokenNameAssignableOrSynonym, TokenNameAssignableRedundantlyOrSynonym, TokenNameassume, TokenNameassume_redundantly, TokenNameAT, TokenNameaxiom, TokenNameBehaviorOrSynonym, TokenNameboolean, TokenNamebreak, TokenNamebyte, TokenNamecase, TokenNamecatch, TokenNamechar, TokenNameCharacterLiteral, TokenNameclass, TokenNamecode_bigint_math, TokenNamecode_java_math, TokenNamecode_safe_math, TokenNameCOLON, TokenNameCOMMA, TokenNameCOMMENT_BLOCK, TokenNameCOMMENT_JAVADOC, TokenNameCOMMENT_LINE, TokenNameconst, TokenNameconstraint, TokenNameconstraint_redundantly, TokenNamecontinue, TokenNamedecreases, TokenNamedecreases_redundantly, TokenNamedefault, TokenNamediverges, TokenNamediverges_redundantly, TokenNameDIVIDE, TokenNameDIVIDE_EQUAL, TokenNamedo, TokenNameDOT, TokenNameDOTDOT, TokenNamedouble, TokenNameDoubleLiteral, TokenNameELLIPSIS, TokenNameelse, TokenNameEnsuresOrSynonym, TokenNameEnsuresRedundantlyOrSynonym, TokenNameenum, TokenNameEOF, TokenNameEQUAL, TokenNameEQUAL_EQUAL, TokenNameEQUIV, TokenNameERROR, TokenNameextends, TokenNamefalse, TokenNamefinal, TokenNamefinally, TokenNamefloat, TokenNameFloatingPointLiteral, TokenNamefor, TokenNameforall, TokenNameghost, TokenNamegoto, TokenNameGREATER, TokenNameGREATER_EQUAL, TokenNamehelper, TokenNameIdentifier, TokenNameif, TokenNameimplements, TokenNameIMPLIES, TokenNameimplies_that, TokenNameimport, TokenNamein, TokenNamein_redundantly, TokenNameInformalDescription, TokenNameinitially, TokenNameinstance, TokenNameinstanceof, TokenNameint, TokenNameIntegerLiteral, TokenNameinterface, TokenNameinvariant, TokenNameinvariant_redundantly, TokenNamejml_assert, TokenNamejml_assert_redundantly, TokenNameLBRACE, TokenNameLBRACE_OR, TokenNameLBRACKET, TokenNameLEFT_SHIFT, TokenNameLEFT_SHIFT_EQUAL, TokenNameLESS, TokenNameLESS_EQUAL, TokenNamelong, TokenNameLongLiteral, TokenNameloop_invariant, TokenNameloop_invariant_redundantly, TokenNameLPAREN, TokenNamemaps, TokenNamemaps_redundantly, TokenNameMINUS, TokenNameMINUS_EQUAL, TokenNameMINUS_MINUS, TokenNamemodel, TokenNamemono_non_null, TokenNameMULTIPLY, TokenNameMULTIPLY_EQUAL, TokenNamenative, TokenNamenew, TokenNamenon_null, TokenNamenon_null_by_default, TokenNameNOT, TokenNameNOT_EQUAL, TokenNameNOT_EQUIV, TokenNamenowarn, TokenNamenull, TokenNamenullable, TokenNamenullable_by_default, TokenNameold, TokenNameOR, TokenNameOR_EQUAL, TokenNameOR_OR, TokenNameOR_RBRACE, TokenNamepackage, TokenNamepeer, TokenNamePLUS, TokenNamePLUS_EQUAL, TokenNamePLUS_PLUS, TokenNameprivate, TokenNameprotected, TokenNamepublic, TokenNamepure, TokenNameQUESTION, TokenNameRBRACE, TokenNameRBRACKET, TokenNamereadonly, TokenNameREMAINDER, TokenNameREMAINDER_EQUAL, TokenNamerep, TokenNamerepresents, TokenNameREPRESENTS, TokenNamerepresents_redundantly, TokenNameRequiresOrSynonym, TokenNameRequiresRedundantlyOrSynonym, TokenNamereturn, TokenNameREV_IMPLIES, TokenNameRIGHT_SHIFT, TokenNameRIGHT_SHIFT_EQUAL, TokenNameRPAREN, TokenNameSEMICOLON, TokenNameset, TokenNameshort, TokenNamesignals_only, TokenNamesignals_only_redundantly, TokenNameSignalsOrSynonym, TokenNameSignalsRedundantlyOrSynonym, TokenNameslash_elemtype, TokenNameslash_everything, TokenNameslash_exists, TokenNameslash_forall, TokenNameslash_fresh, TokenNameslash_into, TokenNameslash_max, TokenNameslash_min, TokenNameslash_nonnullelements, TokenNameslash_not_assigned, TokenNameslash_not_modified, TokenNameslash_not_specified, TokenNameslash_nothing, TokenNameslash_num_of, TokenNameslash_old, TokenNameslash_peer, TokenNameslash_pre, TokenNameslash_product, TokenNameslash_readonly, TokenNameslash_rep, TokenNameslash_result, TokenNameslash_same, TokenNameslash_sum, TokenNameslash_type, TokenNameslash_typeof, TokenNamespec_bigint_math, TokenNamespec_java_math, TokenNamespec_protected, TokenNamespec_public, TokenNamespec_safe_math, TokenNamestatic, TokenNamestrictfp, TokenNameStringLiteral, TokenNameSUBTYPE, TokenNamesuper, TokenNameswitch, TokenNamesynchronized, TokenNamethis, TokenNamethrow, TokenNamethrows, TokenNametransient, TokenNametrue, TokenNametry, TokenNameTWIDDLE, TokenNameuninitialized, TokenNameUNSIGNED_RIGHT_SHIFT, TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL, TokenNamevoid, TokenNamevolatile, TokenNamewhile, TokenNameWHITESPACE, TokenNameXOR, TokenNameXOR_EQUAL
 
Fields inherited from interface org.eclipse.jdt.internal.compiler.ast.OperatorIds
AND, AND_AND, DIVIDE, EQUAL, EQUAL_EQUAL, GREATER, GREATER_EQUAL, INSTANCEOF, JML_ELEMTYPE, JML_EQUIV, JML_IMPLIES, JML_NONNULLELEMENTS, JML_NOT_ASSIGNED, JML_NOT_EQUIV, JML_NOT_MODIFIED, JML_OLD, JML_PRE, JML_REPRESENTS, JML_REV_IMPLIES, JML_TYPE, JML_TYPEOF, JmlOtherOpIdStart, LEFT_SHIFT, LESS, LESS_EQUAL, MINUS, MINUS_MINUS, MULTIPLY, NOT, NOT_EQUAL, NumberOfExtraTablesForJML, NumberOfTables, OR, OR_OR, PLUS, PLUS_PLUS, QUESTIONCOLON, REMAINDER, RIGHT_SHIFT, TWIDDLE, UNSIGNED_RIGHT_SHIFT, XOR
 
Fields inherited from interface org.eclipse.jdt.internal.compiler.lookup.TypeIds
Boolean2Boolean, Boolean2Int, Boolean2String, BOXING, Byte2Byte, Byte2Char, Byte2Double, Byte2Float, Byte2Int, Byte2Long, Byte2Short, Byte2String, Char2Byte, Char2Char, Char2Double, Char2Float, Char2Int, Char2Long, Char2Short, Char2String, COMPILE_TYPE_MASK, Double2Byte, Double2Char, Double2Double, Double2Float, Double2Int, Double2Long, Double2Short, Double2String, Float2Byte, Float2Char, Float2Double, Float2Float, Float2Int, Float2Long, Float2Short, Float2String, IMPLICIT_CONVERSION_MASK, Int2Byte, Int2Char, Int2Double, Int2Float, Int2Int, Int2Long, Int2Short, Int2String, Long2Byte, Long2Char, Long2Double, Long2Float, Long2Int, Long2Long, Long2Short, Long2String, NoId, Null2String, Object2Object, Object2String, Short2Byte, Short2Char, Short2Double, Short2Float, Short2Int, Short2Long, Short2Short, Short2String, String2String, T_boolean, T_byte, T_char, T_double, T_float, T_int, T_JavaIoException, T_JavaIoExternalizable, T_JavaIoObjectStreamException, T_JavaIoPrintStream, T_JavaIoSerializable, T_JavaLangAnnotationAnnotation, T_JavaLangAnnotationDocumented, T_JavaLangAnnotationElementType, T_JavaLangAnnotationInherited, T_JavaLangAnnotationRetention, T_JavaLangAnnotationRetentionPolicy, T_JavaLangAnnotationTarget, T_JavaLangAssertionError, T_JavaLangBoolean, T_JavaLangByte, T_JavaLangCharacter, T_JavaLangClass, T_JavaLangClassNotFoundException, T_JavaLangCloneable, T_JavaLangDeprecated, T_JavaLangDouble, T_JavaLangEnum, T_JavaLangError, T_JavaLangException, T_JavaLangFloat, T_JavaLangIllegalArgumentException, T_JavaLangInteger, T_JavaLangIterable, T_JavaLangLong, T_JavaLangNoClassDefError, T_JavaLangObject, T_JavaLangOverride, T_JavaLangReflectConstructor, T_JavaLangReflectField, T_JavaLangReflectMethod, T_JavaLangRuntimeException, T_JavaLangShort, T_JavaLangString, T_JavaLangStringBuffer, T_JavaLangStringBuilder, T_JavaLangSuppressWarnings, T_JavaLangSystem, T_JavaLangThrowable, T_JavaLangVoid, T_JavaUtilIterator, T_long, T_null, T_short, T_undefined, T_void, UNBOXING
 
Constructor Summary
AssistParser(ProblemReporter problemReporter)
           
 
Method Summary
abstract  char[] assistIdentifier()
           
 int bodyEnd(AbstractMethodDeclaration method)
           
 int bodyEnd(Initializer initializer)
           
 RecoveredElement buildInitialRecoveryState()
           
abstract  ImportReference createAssistImportReference(char[][] tokens, long[] positions, int mod)
           
abstract  ImportReference createAssistPackageReference(char[][] tokens, long[] positions)
           
abstract  TypeReference createParameterizedQualifiedAssistTypeReference(char[][] previousIdentifiers, TypeReference[][] typeArguments, char[] asistIdentifier, TypeReference[] assistTypeArguments, long[] positions)
           
abstract  TypeReference createParameterizedSingleAssistTypeReference(TypeReference[] typeArguments, char[] assistName, long position)
           
abstract  NameReference createQualifiedAssistNameReference(char[][] previousIdentifiers, char[] assistName, long[] positions)
           
abstract  TypeReference createQualifiedAssistTypeReference(char[][] previousIdentifiers, char[] assistName, long[] positions)
           
abstract  NameReference createSingleAssistNameReference(char[] assistName, long position)
           
abstract  TypeReference createSingleAssistTypeReference(char[] assistName, long position)
           
 void flushAssistState()
           
 void goForBlockStatementsopt()
           
 void goForBlockStatementsOrCatchHeader()
           
 void goForCompilationUnit()
           
 void goForHeaders()
           
 void initialize()
           
 void initialize(boolean initializeNLS)
           
abstract  void initializeScanner()
           
 void parseBlockStatements(AbstractMethodDeclaration md, CompilationUnitDeclaration unit)
          Parse the block statements inside the given method declaration and try to complete at the cursor location.
 void parseBlockStatements(ConstructorDeclaration cd, CompilationUnitDeclaration unit)
          Parse the block statements inside the given constructor declaration and try to complete at the cursor location.
 void parseBlockStatements(Initializer initializer, TypeDeclaration type, CompilationUnitDeclaration unit)
          Parse the block statements inside the given initializer and try to complete at the cursor location.
 void parseBlockStatements(MethodDeclaration md, CompilationUnitDeclaration unit)
          Parse the block statements inside the given method declaration and try to complete at the cursor location.
 void recoveryExitFromVariable()
           
 void recoveryTokenCheck()
           
 void reset()
           
abstract  void setAssistIdentifier(char[] assistIdent)
           
 
Methods inherited from class org.eclipse.jdt.internal.compiler.parser.Parser
arrayInitializer, asi, base_check, buildFilesFromLPG, checkComment, containsComment, convertToMethodDeclaration, dietParse, flushCommentsDefinedPriorTo, getFirstToken, getJavaDocPositions, getMethodBodies, goForClassBodyDeclarations, goForExpression, goForFieldDeclaration, goForGenericMethodDeclaration, goForImportDeclaration, goForInitializer, goForMemberValue, goForMethodBody, goForPackageDeclaration, goForTypeDeclaration, in_symbol, initTables, jumpOverMethodBody, nasi, ntAction, parse, parse, parse, parse, parse, parse, parseClassBodyDeclarations, parseExpression, parseMemberValue, parseStatements, persistLineSeparatorPositions, problemReporter, setMethodsFullRecovery, setStatementsRecovery, tAction, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

assistNode

public ASTNode assistNode

isOrphanCompletionNode

public boolean isOrphanCompletionNode
Constructor Detail

AssistParser

public AssistParser(ProblemReporter problemReporter)
Method Detail

assistIdentifier

public abstract char[] assistIdentifier()

bodyEnd

public int bodyEnd(AbstractMethodDeclaration method)

bodyEnd

public int bodyEnd(Initializer initializer)

buildInitialRecoveryState

public RecoveredElement buildInitialRecoveryState()
Overrides:
buildInitialRecoveryState in class Parser

createAssistImportReference

public abstract ImportReference createAssistImportReference(char[][] tokens,
                                                            long[] positions,
                                                            int mod)

createAssistPackageReference

public abstract ImportReference createAssistPackageReference(char[][] tokens,
                                                             long[] positions)

createQualifiedAssistNameReference

public abstract NameReference createQualifiedAssistNameReference(char[][] previousIdentifiers,
                                                                 char[] assistName,
                                                                 long[] positions)

createQualifiedAssistTypeReference

public abstract TypeReference createQualifiedAssistTypeReference(char[][] previousIdentifiers,
                                                                 char[] assistName,
                                                                 long[] positions)

createParameterizedQualifiedAssistTypeReference

public abstract TypeReference createParameterizedQualifiedAssistTypeReference(char[][] previousIdentifiers,
                                                                              TypeReference[][] typeArguments,
                                                                              char[] asistIdentifier,
                                                                              TypeReference[] assistTypeArguments,
                                                                              long[] positions)

createSingleAssistNameReference

public abstract NameReference createSingleAssistNameReference(char[] assistName,
                                                              long position)

createSingleAssistTypeReference

public abstract TypeReference createSingleAssistTypeReference(char[] assistName,
                                                              long position)

createParameterizedSingleAssistTypeReference

public abstract TypeReference createParameterizedSingleAssistTypeReference(TypeReference[] typeArguments,
                                                                           char[] assistName,
                                                                           long position)

flushAssistState

public void flushAssistState()

goForBlockStatementsopt

public void goForBlockStatementsopt()
Overrides:
goForBlockStatementsopt in class Parser

goForHeaders

public void goForHeaders()
Overrides:
goForHeaders in class Parser

goForCompilationUnit

public void goForCompilationUnit()
Overrides:
goForCompilationUnit in class Parser

goForBlockStatementsOrCatchHeader

public void goForBlockStatementsOrCatchHeader()
Overrides:
goForBlockStatementsOrCatchHeader in class Parser

initialize

public void initialize()
Overrides:
initialize in class Parser

initialize

public void initialize(boolean initializeNLS)
Overrides:
initialize in class Parser

initializeScanner

public abstract void initializeScanner()
Overrides:
initializeScanner in class Parser

parseBlockStatements

public void parseBlockStatements(AbstractMethodDeclaration md,
                                 CompilationUnitDeclaration unit)
Parse the block statements inside the given method declaration and try to complete at the cursor location.


parseBlockStatements

public void parseBlockStatements(ConstructorDeclaration cd,
                                 CompilationUnitDeclaration unit)
Parse the block statements inside the given constructor declaration and try to complete at the cursor location.


parseBlockStatements

public void parseBlockStatements(Initializer initializer,
                                 TypeDeclaration type,
                                 CompilationUnitDeclaration unit)
Parse the block statements inside the given initializer and try to complete at the cursor location.


parseBlockStatements

public void parseBlockStatements(MethodDeclaration md,
                                 CompilationUnitDeclaration unit)
Parse the block statements inside the given method declaration and try to complete at the cursor location.


recoveryExitFromVariable

public void recoveryExitFromVariable()
Overrides:
recoveryExitFromVariable in class Parser

recoveryTokenCheck

public void recoveryTokenCheck()
Overrides:
recoveryTokenCheck in class Parser

reset

public void reset()

setAssistIdentifier

public abstract void setAssistIdentifier(char[] assistIdent)