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

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.compiler.parser.TheOriginalJDTParserClass
      extended by org.aspectj.org.eclipse.jdt.internal.compiler.parser.Parser
          extended by org.aspectj.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


Nested Class Summary
 
Nested classes/interfaces inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.parser.Parser
Parser.IDeclarationFactory
 
Field Summary
protected static int ASSIST_PARSER
           
 ASTNode assistNode
           
protected  int bracketDepth
           
protected  int[] elementInfoStack
           
protected  int[] elementKindStack
           
protected  java.lang.Object[] elementObjectInfoStack
           
protected  int elementPtr
           
protected static int ElementStackIncrement
           
protected  boolean isFirst
           
 boolean isOrphanCompletionNode
           
protected static int K_ATTRIBUTE_VALUE_DELIMITER
           
protected static int K_ENUM_CONSTANT_DELIMITER
           
protected static int K_FIELD_INITIALIZER_DELIMITER
           
protected static int K_METHOD_DELIMITER
           
protected static int K_SELECTOR
           
protected static int K_TYPE_DELIMITER
           
protected  int lastModifiers
           
protected  int lastModifiersStart
           
protected static int NO_BODY
           
protected  int previousIdentifierPtr
           
protected  int previousInfo
           
protected  int previousKind
           
protected  java.lang.Object previousObjectInfo
           
protected  int previousToken
           
protected static int SUPER_CONSTRUCTOR
           
protected static int THIS_CONSTRUCTOR
           
protected static int WITH_BODY
           
 
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.parser.Parser
aspectIntPtr, aspectIntStack
 
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.parser.TheOriginalJDTParserClass
annotationRecoveryActivated, asb, asr, astLengthPtr, astLengthStack, astPtr, astStack, AstStackIncrement, base_action, BracketKinds, check_table, checkExternalizeStrings, compilationUnit, CurlyBracket, currentElement, currentToken, currentTokenStart, DEBUG, DEBUG_AUTOMATON, diet, dietInt, dimensions, endPosition, endStatementPosition, expressionLengthPtr, expressionLengthStack, expressionPtr, expressionStack, ExpressionStackIncrement, FALL_THROUGH_TAG, firstToken, genericsIdentifiersLengthPtr, genericsIdentifiersLengthStack, genericsLengthPtr, genericsLengthStack, genericsPtr, genericsStack, GenericsStackIncrement, hasError, hasReportedError, identifierLengthPtr, identifierLengthStack, identifierPositionStack, identifierPtr, identifierStack, ignoreNextOpeningBrace, in_symb, intPtr, intStack, javadoc, javadocParser, lastAct, lastCheckPoint, lastErrorEndPosition, lastErrorEndPositionBeforeRecovery, lastIgnoredToken, lastJavadocEnd, lastPosistion, lhs, listLength, listTypeParameterLength, lParenPos, methodRecoveryActivated, modifiers, modifiersSourceStart, name, nasb, nasr, nestedMethod, nestedType, nextIgnoredToken, nextTypeStart, non_terminal_index, optimizeStringLiterals, options, pendingRecoveredType, problemReporter, rBraceEnd, rBraceStart, rBraceSuccessorStart, readableName, readManager, realBlockPtr, realBlockStack, recordStringLiterals, recoveredStaticInitializerStart, recoveredTypePtr, recoveredTypes, recovery_templates, recovery_templates_index, recoveryScanner, referenceContext, reportOnlyOneSyntaxError, reportSyntaxErrorIsRequired, restartRecovery, reverse_index, rhs, RoundBracket, rParenPos, rules_compliance, scanner, scope_la, scope_lhs, scope_prefix, scope_rhs, scope_state, scope_state_set, scope_suffix, SquareBracket, stack, StackIncrement, statementRecoveryActivated, statements_recovery_filter, stateStackTop, SUPER_CALL, synchronizedBlockSourceStart, term_action, term_check, terminal_index, THIS_CALL, variablesCounter, VERBOSE_RECOVERY
 
Fields inherited from interface org.aspectj.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.aspectj.org.eclipse.jdt.internal.compiler.parser.TerminalTokens
TokenNameabstract, TokenNameafter, TokenNameAND, TokenNameAND_AND, TokenNameAND_EQUAL, TokenNamearound, TokenNameaspect, TokenNameassert, TokenNameAT, TokenNamebefore, TokenNameboolean, TokenNamebreak, TokenNamebyte, TokenNamecase, TokenNamecatch, TokenNamechar, TokenNameCharacterLiteral, TokenNameclass, TokenNameCOLON, TokenNameCOMMA, TokenNameCOMMENT_BLOCK, TokenNameCOMMENT_JAVADOC, TokenNameCOMMENT_LINE, TokenNameconst, TokenNamecontinue, TokenNamedeclare, TokenNamedefault, TokenNameDIVIDE, TokenNameDIVIDE_EQUAL, TokenNamedo, TokenNameDOT, TokenNamedouble, TokenNameDoubleLiteral, TokenNameELLIPSIS, TokenNameelse, TokenNameenum, TokenNameEOF, TokenNameEQUAL, TokenNameEQUAL_EQUAL, TokenNameERROR, TokenNameextends, TokenNamefalse, TokenNamefinal, TokenNamefinally, TokenNamefloat, TokenNameFloatingPointLiteral, TokenNamefor, TokenNamegoto, TokenNameGREATER, TokenNameGREATER_EQUAL, TokenNameIdentifier, TokenNameif, TokenNameimplements, TokenNameimport, TokenNameinstanceof, TokenNameint, TokenNameIntegerLiteral, TokenNameinterface, TokenNameLBRACE, TokenNameLBRACKET, TokenNameLEFT_SHIFT, TokenNameLEFT_SHIFT_EQUAL, TokenNameLESS, TokenNameLESS_EQUAL, TokenNamelong, TokenNameLongLiteral, TokenNameLPAREN, TokenNameMINUS, TokenNameMINUS_EQUAL, TokenNameMINUS_MINUS, TokenNameMULTIPLY, TokenNameMULTIPLY_EQUAL, TokenNamenative, TokenNamenew, TokenNameNOT, TokenNameNOT_EQUAL, TokenNamenull, TokenNameOR, TokenNameOR_EQUAL, TokenNameOR_OR, TokenNamepackage, TokenNamePLUS, TokenNamePLUS_EQUAL, TokenNamePLUS_PLUS, TokenNamepointcut, TokenNameprivate, TokenNameprivileged, TokenNameprotected, TokenNamepublic, TokenNameQUESTION, TokenNameRBRACE, TokenNameRBRACKET, TokenNameREMAINDER, TokenNameREMAINDER_EQUAL, TokenNamereturn, TokenNameRIGHT_SHIFT, TokenNameRIGHT_SHIFT_EQUAL, TokenNameRPAREN, TokenNameSEMICOLON, TokenNameshort, TokenNamestatic, TokenNamestrictfp, TokenNameStringLiteral, TokenNamesuper, TokenNameswitch, TokenNamesynchronized, TokenNamethis, TokenNamethrow, TokenNamethrows, TokenNametransient, TokenNametrue, TokenNametry, TokenNameTWIDDLE, TokenNameUNSIGNED_RIGHT_SHIFT, TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL, TokenNamevoid, TokenNamevolatile, TokenNamewhile, TokenNameWHITESPACE, TokenNameXOR, TokenNameXOR_EQUAL
 
Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.ast.OperatorIds
AND, AND_AND, DIVIDE, EQUAL, EQUAL_EQUAL, GREATER, GREATER_EQUAL, INSTANCEOF, LEFT_SHIFT, LESS, LESS_EQUAL, MINUS, MINUS_MINUS, MULTIPLY, NOT, NOT_EQUAL, NumberOfTables, OR, OR_OR, PLUS, PLUS_PLUS, QUESTIONCOLON, REMAINDER, RIGHT_SHIFT, TWIDDLE, UNSIGNED_RIGHT_SHIFT, XOR
 
Fields inherited from interface org.aspectj.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, Null2Null, Null2String, Object2boolean, Object2byte, Object2char, Object2double, Object2float, Object2int, Object2long, Object2Object, Object2short, 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_JavaLangAutoCloseable, 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_JavaLangInvokeMethodHandlePolymorphicSignature, T_JavaLangIterable, T_JavaLangLong, T_JavaLangNoClassDefError, T_JavaLangObject, T_JavaLangOverride, T_JavaLangReflectConstructor, T_JavaLangReflectField, T_JavaLangReflectMethod, T_JavaLangRuntimeException, T_JavaLangSafeVarargs, T_JavaLangShort, T_JavaLangString, T_JavaLangStringBuffer, T_JavaLangStringBuilder, T_JavaLangSuppressWarnings, T_JavaLangSystem, T_JavaLangThrowable, T_JavaLangVoid, T_JavaUtilCollection, T_JavaUtilIterator, T_long, T_null, T_short, T_undefined, T_void, UNBOXING
 
Constructor Summary
AssistParser(ProblemReporter problemReporter)
           
 
Method Summary
abstract  char[] assistIdentifier()
           
 java.lang.Object becomeSimpleParser()
          The parser become a simple parser which behave like a Parser
 int bodyEnd(AbstractMethodDeclaration method)
           
 int bodyEnd(Initializer initializer)
           
 RecoveredElement buildInitialRecoveryState()
           
protected  void consumeAnnotationTypeDeclarationHeader()
           
protected  void consumeClassBodyDeclaration()
           
protected  void consumeClassBodyopt()
           
protected  void consumeClassHeader()
           
protected  void consumeConstructorBody()
           
protected  void consumeConstructorHeader()
           
protected  void consumeEnhancedForStatementHeaderInit(boolean hasModifiers)
           
protected  void consumeEnterAnonymousClassBody(boolean qualified)
           
protected  void consumeEnterMemberValue()
           
protected  void consumeEnumConstantHeader()
           
protected  void consumeEnumConstantHeaderName()
           
protected  void consumeEnumConstantNoClassBody()
           
protected  void consumeEnumConstantWithClassBody()
           
protected  void consumeEnumHeader()
           
protected  void consumeExitMemberValue()
           
protected  void consumeExplicitConstructorInvocation(int flag, int recFlag)
           
protected  void consumeForceNoDiet()
           
protected  void consumeInterfaceHeader()
           
protected  void consumeMethodBody()
           
protected  void consumeMethodDeclaration(boolean isNotAbstract)
           
protected  void consumeMethodHeader()
           
protected  void consumeMethodInvocationName()
           
protected  void consumeMethodInvocationNameWithTypeArguments()
           
protected  void consumeMethodInvocationPrimary()
           
protected  void consumeMethodInvocationPrimaryWithTypeArguments()
           
protected  void consumeMethodInvocationSuper()
           
protected  void consumeMethodInvocationSuperWithTypeArguments()
           
protected  void consumeNestedMethod()
           
protected  void consumeOpenBlock()
           
protected  void consumeOpenFakeBlock()
           
protected  void consumePackageDeclarationName()
           
protected  void consumePackageDeclarationNameWithModifiers()
           
protected  void consumeRestoreDiet()
           
protected  void consumeSingleStaticImportDeclarationName()
           
protected  void consumeSingleTypeImportDeclarationName()
           
protected  void consumeStaticImportOnDemandDeclarationName()
           
protected  void consumeStaticInitializer()
           
protected  void consumeStaticOnly()
           
protected  void consumeToken(int token)
           
protected  void consumeTypeImportOnDemandDeclarationName()
           
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()
           
protected  void flushElementStack()
           
protected  TypeReference getAssistTypeReferenceForGenericType(int dim, int identifierLength, int numberOfIdentifiers)
           
protected  TypeReference getTypeReference(int dim)
           
protected  NameReference getUnspecifiedReferenceOptimized()
           
 void goForBlockStatementsopt()
           
 void goForBlockStatementsOrCatchHeader()
           
 void goForCompilationUnit()
           
 void goForHeaders()
           
protected  char[][] identifierSubSet(int subsetLength)
           
protected  int indexOfAssistIdentifier()
           
protected  int indexOfAssistIdentifier(boolean useGenericsStack)
           
 void initialize()
           
 void initialize(boolean initializeNLS)
           
abstract  void initializeScanner()
           
protected  boolean isIndirectlyInsideFieldInitialization()
           
protected  boolean isIndirectlyInsideMethod()
           
protected  boolean isIndirectlyInsideType()
           
protected  boolean isInsideAttributeValue()
           
protected  boolean isInsideFieldInitialization()
           
protected  boolean isInsideMethod()
           
protected  boolean isInsideType()
           
protected  int lastIndexOfElement(int kind)
           
 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.
protected  void popElement(int kind)
           
protected  void popUntilElement(int kind)
           
protected  void prepareForBlockStatements()
           
protected  void prepareForHeaders()
           
protected  void pushOnElementStack(int kind)
           
protected  void pushOnElementStack(int kind, int info)
           
protected  void pushOnElementStack(int kind, int info, java.lang.Object objectInfo)
           
 void recoveryExitFromVariable()
           
 void recoveryTokenCheck()
           
 void reset()
           
 void restoreAssistParser(java.lang.Object parserState)
          Restore the parser as an assist parser
protected  boolean resumeAfterRecovery()
           
abstract  void setAssistIdentifier(char[] assistIdent)
           
protected  int topKnownElementInfo(int owner)
           
protected  int topKnownElementInfo(int owner, int offSet)
           
protected  int topKnownElementKind(int owner)
           
protected  int topKnownElementKind(int owner, int offSet)
           
protected  java.lang.Object topKnownElementObjectInfo(int owner)
           
protected  java.lang.Object topKnownElementObjectInfo(int owner, int offSet)
           
protected  ASTNode wrapWithExplicitConstructorCallIfNeeded(ASTNode ast)
          If the given ast node is inside an explicit constructor call then wrap it with a fake constructor call.
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.parser.Parser
consumeAroundDeclaration, consumeAroundHeader, consumeAroundHeaderName, consumeAspectDeclaration, consumeAspectHeader, consumeAspectHeaderName, consumeAspectHeaderNameWithTypeParameters, consumeAspectHeaderRest, consumeBasicAdviceDeclaration, consumeBasicAdviceHeader, consumeBasicAdviceHeaderName, consumeClassBodyDeclarationInAspect, consumeDeclareAnnotation, consumeDeclareAnnotationHeader, consumeDeclareDeclaration, consumeDeclareHeader, consumeEmptyPointcutDeclaration, consumeExitITDVariableWithInitializer, consumeExitITDVariableWithoutInitializer, consumeExtraParameterNoFormal, consumeExtraParameterWithFormal, consumeInterTypeConstructorDeclaration, consumeInterTypeConstructorHeader, consumeInterTypeConstructorHeaderName, consumeInterTypeFieldDeclaration, consumeInterTypeFieldHeader, consumeInterTypeMethodDeclaration, consumeInterTypeMethodHeader, consumeInterTypeMethodHeaderName, consumePointcutDeclaration, consumePointcutDesignatorOnAdvice, consumePointcutDesignatorOnDeclaration, consumePointcutHeader, consumePseudoToken, consumePseudoToken, consumePseudoTokenIdentifier, consumePseudoTokenIf, consumePseudoTokenLiteral, consumePseudoTokenModifier, consumePseudoTokenPrimitiveType, consumePseudoTokens, consumeRule, consumeSimpleAssertStatement, createConstructorDeclaration, createMethodDeclaration, display, getCurrentTokenStart, popPointcutDesignator, popPseudoTokens, pushOnAspectIntStack, shouldTryToRecover
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.parser.TheOriginalJDTParserClass
annotationRecoveryCheckPoint, arrayInitializer, asi, base_check, blockReal, buildFilesFromLPG, checkAndSetModifiers, checkComment, checkForDiamond, checkNonNLSAfterBodyEnd, classInstanceCreation, computeQualifiedGenericsFromRightSide, computeReverseTable, concatExpressionLists, concatGenericsLists, concatNodeLists, consumeAdditionalBound, consumeAdditionalBound1, consumeAdditionalBoundList, consumeAdditionalBoundList1, consumeAllocationHeader, consumeAnnotationAsModifier, consumeAnnotationName, consumeAnnotationTypeDeclaration, consumeAnnotationTypeDeclarationHeaderName, consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters, consumeAnnotationTypeMemberDeclaration, consumeAnnotationTypeMemberDeclarations, consumeAnnotationTypeMemberDeclarationsopt, consumeArgumentList, consumeArguments, consumeArrayAccess, consumeArrayCreationExpressionWithInitializer, consumeArrayCreationExpressionWithoutInitializer, consumeArrayCreationHeader, consumeArrayInitializer, consumeArrayTypeWithTypeArgumentsName, consumeAssertStatement, consumeAssignment, consumeAssignmentOperator, consumeBinaryExpression, consumeBinaryExpressionWithName, consumeBlock, consumeBlockStatements, consumeCaseLabel, consumeCastExpressionLL1, consumeCastExpressionWithGenericsArray, consumeCastExpressionWithNameArray, consumeCastExpressionWithPrimitiveType, consumeCastExpressionWithQualifiedGenericsArray, consumeCatches, consumeCatchFormalParameter, consumeCatchHeader, consumeCatchType, consumeClassBodyDeclarations, consumeClassBodyDeclarationsopt, consumeClassDeclaration, consumeClassHeaderExtends, consumeClassHeaderImplements, consumeClassHeaderName1, consumeClassInstanceCreationExpression, consumeClassInstanceCreationExpressionName, consumeClassInstanceCreationExpressionQualified, consumeClassInstanceCreationExpressionQualifiedWithTypeArguments, consumeClassInstanceCreationExpressionWithTypeArguments, consumeClassOrInterface, consumeClassOrInterfaceName, consumeClassTypeElt, consumeClassTypeList, consumeCompilationUnit, consumeConditionalExpression, consumeConditionalExpressionWithName, consumeConstructorBlockStatements, consumeConstructorDeclaration, consumeConstructorHeaderName, consumeConstructorHeaderNameWithTypeParameters, consumeCreateInitializer, consumeDefaultLabel, consumeDefaultModifiers, consumeDiet, consumeDims, consumeDimWithOrWithOutExpr, consumeDimWithOrWithOutExprs, consumeEmptyAnnotationTypeMemberDeclarationsopt, consumeEmptyArgumentListopt, consumeEmptyArguments, consumeEmptyArrayInitializer, consumeEmptyArrayInitializeropt, consumeEmptyBlockStatementsopt, consumeEmptyCatchesopt, consumeEmptyClassBodyDeclarationsopt, consumeEmptyDimsopt, consumeEmptyEnumDeclarations, consumeEmptyExpression, consumeEmptyForInitopt, consumeEmptyForUpdateopt, consumeEmptyInterfaceMemberDeclarationsopt, consumeEmptyInternalCompilationUnit, consumeEmptyMemberValueArrayInitializer, consumeEmptyMemberValuePairsopt, consumeEmptyMethodHeaderDefaultValue, consumeEmptyStatement, consumeEmptySwitchBlock, consumeEmptyTypeDeclaration, consumeEnhancedForStatement, consumeEnhancedForStatementHeader, consumeEnterCompilationUnit, consumeEnterMemberValueArrayInitializer, consumeEnterVariable, consumeEnumBodyNoConstants, consumeEnumBodyWithConstants, consumeEnumConstants, consumeEnumDeclaration, consumeEnumDeclarations, consumeEnumHeaderName, consumeEnumHeaderNameWithTypeParameters, consumeEqualityExpression, consumeEqualityExpressionWithName, consumeExitTryBlock, consumeExitVariableWithInitialization, consumeExitVariableWithoutInitialization, consumeExplicitConstructorInvocationWithTypeArguments, consumeExpressionStatement, consumeFieldAccess, consumeFieldDeclaration, consumeForInit, consumeFormalParameter, consumeFormalParameterList, consumeFormalParameterListopt, consumeGenericType, consumeGenericTypeArrayType, consumeGenericTypeNameArrayType, consumeGenericTypeWithDiamond, consumeImportDeclaration, consumeImportDeclarations, consumeInsideCastExpression, consumeInsideCastExpressionLL1, consumeInsideCastExpressionWithQualifiedGenerics, consumeInstanceOfExpression, consumeInstanceOfExpressionWithName, consumeInterfaceDeclaration, consumeInterfaceHeaderExtends, consumeInterfaceHeaderName1, consumeInterfaceMemberDeclarations, consumeInterfaceMemberDeclarationsopt, consumeInterfaceType, consumeInterfaceTypeList, consumeInternalCompilationUnit, consumeInternalCompilationUnitWithTypes, consumeInvalidAnnotationTypeDeclaration, consumeInvalidConstructorDeclaration, consumeInvalidConstructorDeclaration, consumeInvalidEnumDeclaration, consumeInvalidInterfaceDeclaration, consumeInvalidMethodDeclaration, consumeLabel, consumeLeftParen, consumeLocalVariableDeclaration, consumeLocalVariableDeclarationStatement, consumeMarkerAnnotation, consumeMemberValueArrayInitializer, consumeMemberValueAsName, consumeMemberValuePair, consumeMemberValuePairs, consumeMemberValues, consumeMethodHeaderDefaultValue, consumeMethodHeaderExtendedDims, consumeMethodHeaderName, consumeMethodHeaderNameWithTypeParameters, consumeMethodHeaderRightParen, consumeMethodHeaderThrowsClause, consumeModifiers, consumeModifiers2, consumeMultipleResources, consumeNameArrayType, consumeNestedType, consumeNormalAnnotation, consumeOneDimLoop, consumeOnlySynchronized, consumeOnlyTypeArguments, consumeOnlyTypeArgumentsForCastExpression, consumePackageComment, consumePackageDeclaration, consumePostfixExpression, consumePrimaryNoNewArray, consumePrimaryNoNewArrayArrayType, consumePrimaryNoNewArrayName, consumePrimaryNoNewArrayNameSuper, consumePrimaryNoNewArrayNameThis, consumePrimaryNoNewArrayPrimitiveArrayType, consumePrimaryNoNewArrayPrimitiveType, consumePrimaryNoNewArrayThis, consumePrimaryNoNewArrayWithName, consumePrimitiveArrayType, consumePrimitiveType, consumePushLeftBrace, consumePushModifiers, consumePushModifiersForHeader, consumePushPosition, consumePushRealModifiers, consumeQualifiedName, consumeRecoveryMethodHeaderName, consumeRecoveryMethodHeaderNameWithTypeParameters, consumeReduceImports, consumeReferenceType, consumeReferenceType1, consumeReferenceType2, consumeReferenceType3, consumeResourceAsLocalVariableDeclaration, consumeResourceOptionalTrailingSemiColon, consumeResourceSpecification, consumeRightParen, consumeSingleMemberAnnotation, consumeSingleMemberAnnotationMemberValue, consumeSingleResource, consumeStatementBreak, consumeStatementBreakWithLabel, consumeStatementCatch, consumeStatementContinue, consumeStatementContinueWithLabel, consumeStatementDo, consumeStatementExpressionList, consumeStatementFor, consumeStatementIfNoElse, consumeStatementIfWithElse, consumeStatementLabel, consumeStatementReturn, consumeStatementSwitch, consumeStatementSynchronized, consumeStatementThrow, consumeStatementTry, consumeStatementWhile, consumeSwitchBlock, consumeSwitchBlockStatement, consumeSwitchBlockStatements, consumeSwitchLabels, consumeTypeArgument, consumeTypeArgumentList, consumeTypeArgumentList1, consumeTypeArgumentList2, consumeTypeArgumentList3, consumeTypeArgumentReferenceType1, consumeTypeArgumentReferenceType2, consumeTypeArguments, consumeTypeDeclarations, consumeTypeHeaderNameWithTypeParameters, consumeTypeParameter1, consumeTypeParameter1WithExtends, consumeTypeParameter1WithExtendsAndBounds, consumeTypeParameterHeader, consumeTypeParameterList, consumeTypeParameterList1, consumeTypeParameters, consumeTypeParameterWithExtends, consumeTypeParameterWithExtendsAndBounds, consumeUnaryExpression, consumeUnaryExpression, consumeUnionType, consumeUnionTypeAsClassType, consumeVariableDeclarators, consumeVariableInitializers, consumeWildcard, consumeWildcard1, consumeWildcard1WithBounds, consumeWildcard2, consumeWildcard2WithBounds, consumeWildcard3, consumeWildcard3WithBounds, consumeWildcardBounds1Extends, consumeWildcardBounds1Super, consumeWildcardBounds2Extends, consumeWildcardBounds2Super, consumeWildcardBounds3Extends, consumeWildcardBounds3Super, consumeWildcardBoundsExtends, consumeWildcardBoundsSuper, consumeWildcardWithBounds, containsComment, convertToMethodDeclaration, copyDims, createFieldDeclaration, createJavadocParser, createLocalDeclaration, createStringLiteral, currentRecoveryType, dietParse, dispatchDeclarationInto, dispatchDeclarationIntoEnumDeclaration, endParse, flushCommentsDefinedPriorTo, getAnnotationType, getFirstToken, getJavaDocPositions, getMethodBodies, getNextCharacter, getTypeReference, getTypeReferenceForGenericType, getUnspecifiedReference, goForClassBodyDeclarations, goForExpression, goForFieldDeclaration, goForGenericMethodDeclaration, goForImportDeclaration, goForInitializer, goForMemberValue, goForMethodBody, goForPackageDeclaration, goForTypeDeclaration, hasLeadingTagComment, ignoreExpressionAssignment, in_symbol, initTables, jumpOverMethodBody, markEnclosingMemberWithLocalType, moveRecoveryCheckpoint, nasi, newMessageSend, newMessageSendWithTypeArguments, ntAction, optimizedConcatNodeLists, original_state, parse, parse, parse, parse, parse, parse, parse, parseClassBodyDeclarations, parseExpression, parseMemberValue, parseStatements, persistLineSeparatorPositions, problemReporter, pushIdentifier, pushIdentifier, pushOnAstLengthStack, pushOnAstStack, pushOnExpressionStack, pushOnExpressionStackLengthStack, pushOnGenericsIdentifiersLengthStack, pushOnGenericsLengthStack, pushOnGenericsStack, pushOnIntStack, pushOnRealBlockStack, readByteTable, readLongTable, readNameTable, readReadableNameTable, readTable, recoverStatements, reportSyntaxErrors, resetModifiers, resetStacks, resumeOnSyntaxError, setMethodsFullRecovery, setStatementsRecovery, tAction, toString, updateRecoveryState, updateSourceDeclarationParts, updateSourcePosition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

assistNode

public ASTNode assistNode

isOrphanCompletionNode

public boolean isOrphanCompletionNode

lastModifiers

protected int lastModifiers

lastModifiersStart

protected int lastModifiersStart

previousToken

protected int previousToken

previousIdentifierPtr

protected int previousIdentifierPtr

bracketDepth

protected int bracketDepth

ElementStackIncrement

protected static final int ElementStackIncrement
See Also:
Constant Field Values

elementPtr

protected int elementPtr

elementKindStack

protected int[] elementKindStack

elementInfoStack

protected int[] elementInfoStack

elementObjectInfoStack

protected java.lang.Object[] elementObjectInfoStack

previousKind

protected int previousKind

previousInfo

protected int previousInfo

previousObjectInfo

protected java.lang.Object previousObjectInfo

ASSIST_PARSER

protected static final int ASSIST_PARSER
See Also:
Constant Field Values

K_SELECTOR

protected static final int K_SELECTOR
See Also:
Constant Field Values

K_TYPE_DELIMITER

protected static final int K_TYPE_DELIMITER
See Also:
Constant Field Values

K_METHOD_DELIMITER

protected static final int K_METHOD_DELIMITER
See Also:
Constant Field Values

K_FIELD_INITIALIZER_DELIMITER

protected static final int K_FIELD_INITIALIZER_DELIMITER
See Also:
Constant Field Values

K_ATTRIBUTE_VALUE_DELIMITER

protected static final int K_ATTRIBUTE_VALUE_DELIMITER
See Also:
Constant Field Values

K_ENUM_CONSTANT_DELIMITER

protected static final int K_ENUM_CONSTANT_DELIMITER
See Also:
Constant Field Values

THIS_CONSTRUCTOR

protected static final int THIS_CONSTRUCTOR
See Also:
Constant Field Values

SUPER_CONSTRUCTOR

protected static final int SUPER_CONSTRUCTOR
See Also:
Constant Field Values

NO_BODY

protected static final int NO_BODY
See Also:
Constant Field Values

WITH_BODY

protected static final int WITH_BODY
See Also:
Constant Field Values

isFirst

protected boolean isFirst
Constructor Detail

AssistParser

public AssistParser(ProblemReporter problemReporter)
Method Detail

assistIdentifier

public abstract char[] assistIdentifier()

becomeSimpleParser

public java.lang.Object becomeSimpleParser()
The parser become a simple parser which behave like a Parser

Returns:
the state of the assist parser to be able to restore the assist parser state

restoreAssistParser

public void restoreAssistParser(java.lang.Object parserState)
Restore the parser as an assist parser

Parameters:
parserState -

bodyEnd

public int bodyEnd(AbstractMethodDeclaration method)

bodyEnd

public int bodyEnd(Initializer initializer)

buildInitialRecoveryState

public RecoveredElement buildInitialRecoveryState()
Overrides:
buildInitialRecoveryState in class TheOriginalJDTParserClass

consumeAnnotationTypeDeclarationHeader

protected void consumeAnnotationTypeDeclarationHeader()
Overrides:
consumeAnnotationTypeDeclarationHeader in class TheOriginalJDTParserClass

consumeClassBodyDeclaration

protected void consumeClassBodyDeclaration()
Overrides:
consumeClassBodyDeclaration in class TheOriginalJDTParserClass

consumeClassBodyopt

protected void consumeClassBodyopt()
Overrides:
consumeClassBodyopt in class TheOriginalJDTParserClass

consumeClassHeader

protected void consumeClassHeader()
Overrides:
consumeClassHeader in class TheOriginalJDTParserClass

consumeConstructorBody

protected void consumeConstructorBody()
Overrides:
consumeConstructorBody in class TheOriginalJDTParserClass

consumeConstructorHeader

protected void consumeConstructorHeader()
Overrides:
consumeConstructorHeader in class TheOriginalJDTParserClass

consumeEnhancedForStatementHeaderInit

protected void consumeEnhancedForStatementHeaderInit(boolean hasModifiers)
Overrides:
consumeEnhancedForStatementHeaderInit in class TheOriginalJDTParserClass

consumeEnterAnonymousClassBody

protected void consumeEnterAnonymousClassBody(boolean qualified)
Overrides:
consumeEnterAnonymousClassBody in class TheOriginalJDTParserClass

consumeEnterMemberValue

protected void consumeEnterMemberValue()
Overrides:
consumeEnterMemberValue in class TheOriginalJDTParserClass

consumeEnumConstantHeader

protected void consumeEnumConstantHeader()
Overrides:
consumeEnumConstantHeader in class TheOriginalJDTParserClass

consumeEnumConstantHeaderName

protected void consumeEnumConstantHeaderName()
Overrides:
consumeEnumConstantHeaderName in class TheOriginalJDTParserClass

consumeEnumConstantWithClassBody

protected void consumeEnumConstantWithClassBody()
Overrides:
consumeEnumConstantWithClassBody in class TheOriginalJDTParserClass

consumeEnumConstantNoClassBody

protected void consumeEnumConstantNoClassBody()
Overrides:
consumeEnumConstantNoClassBody in class TheOriginalJDTParserClass

consumeEnumHeader

protected void consumeEnumHeader()
Overrides:
consumeEnumHeader in class TheOriginalJDTParserClass

consumeExitMemberValue

protected void consumeExitMemberValue()
Overrides:
consumeExitMemberValue in class TheOriginalJDTParserClass

consumeExplicitConstructorInvocation

protected void consumeExplicitConstructorInvocation(int flag,
                                                    int recFlag)
Overrides:
consumeExplicitConstructorInvocation in class TheOriginalJDTParserClass

consumeForceNoDiet

protected void consumeForceNoDiet()
Overrides:
consumeForceNoDiet in class TheOriginalJDTParserClass

consumeInterfaceHeader

protected void consumeInterfaceHeader()
Overrides:
consumeInterfaceHeader in class TheOriginalJDTParserClass

consumeMethodBody

protected void consumeMethodBody()
Overrides:
consumeMethodBody in class TheOriginalJDTParserClass

consumeMethodDeclaration

protected void consumeMethodDeclaration(boolean isNotAbstract)
Overrides:
consumeMethodDeclaration in class TheOriginalJDTParserClass

consumeMethodHeader

protected void consumeMethodHeader()
Overrides:
consumeMethodHeader in class TheOriginalJDTParserClass

consumeMethodInvocationName

protected void consumeMethodInvocationName()
Overrides:
consumeMethodInvocationName in class Parser

consumeMethodInvocationNameWithTypeArguments

protected void consumeMethodInvocationNameWithTypeArguments()
Overrides:
consumeMethodInvocationNameWithTypeArguments in class TheOriginalJDTParserClass

consumeMethodInvocationPrimary

protected void consumeMethodInvocationPrimary()
Overrides:
consumeMethodInvocationPrimary in class TheOriginalJDTParserClass

consumeMethodInvocationPrimaryWithTypeArguments

protected void consumeMethodInvocationPrimaryWithTypeArguments()
Overrides:
consumeMethodInvocationPrimaryWithTypeArguments in class TheOriginalJDTParserClass

consumeMethodInvocationSuper

protected void consumeMethodInvocationSuper()
Overrides:
consumeMethodInvocationSuper in class TheOriginalJDTParserClass

consumeMethodInvocationSuperWithTypeArguments

protected void consumeMethodInvocationSuperWithTypeArguments()
Overrides:
consumeMethodInvocationSuperWithTypeArguments in class TheOriginalJDTParserClass

consumeNestedMethod

protected void consumeNestedMethod()
Overrides:
consumeNestedMethod in class TheOriginalJDTParserClass

consumeOpenBlock

protected void consumeOpenBlock()
Overrides:
consumeOpenBlock in class TheOriginalJDTParserClass

consumeOpenFakeBlock

protected void consumeOpenFakeBlock()

consumePackageDeclarationName

protected void consumePackageDeclarationName()
Overrides:
consumePackageDeclarationName in class TheOriginalJDTParserClass

consumePackageDeclarationNameWithModifiers

protected void consumePackageDeclarationNameWithModifiers()
Overrides:
consumePackageDeclarationNameWithModifiers in class TheOriginalJDTParserClass

consumeRestoreDiet

protected void consumeRestoreDiet()
Overrides:
consumeRestoreDiet in class TheOriginalJDTParserClass

consumeSingleStaticImportDeclarationName

protected void consumeSingleStaticImportDeclarationName()
Overrides:
consumeSingleStaticImportDeclarationName in class TheOriginalJDTParserClass

consumeSingleTypeImportDeclarationName

protected void consumeSingleTypeImportDeclarationName()
Overrides:
consumeSingleTypeImportDeclarationName in class TheOriginalJDTParserClass

consumeStaticImportOnDemandDeclarationName

protected void consumeStaticImportOnDemandDeclarationName()
Overrides:
consumeStaticImportOnDemandDeclarationName in class TheOriginalJDTParserClass

consumeStaticInitializer

protected void consumeStaticInitializer()
Overrides:
consumeStaticInitializer in class TheOriginalJDTParserClass

consumeStaticOnly

protected void consumeStaticOnly()
Overrides:
consumeStaticOnly in class TheOriginalJDTParserClass

consumeToken

protected void consumeToken(int token)
Overrides:
consumeToken in class Parser

consumeTypeImportOnDemandDeclarationName

protected void consumeTypeImportOnDemandDeclarationName()
Overrides:
consumeTypeImportOnDemandDeclarationName in class TheOriginalJDTParserClass

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()

flushElementStack

protected void flushElementStack()

getTypeReference

protected TypeReference getTypeReference(int dim)
Overrides:
getTypeReference in class TheOriginalJDTParserClass

getAssistTypeReferenceForGenericType

protected TypeReference getAssistTypeReferenceForGenericType(int dim,
                                                             int identifierLength,
                                                             int numberOfIdentifiers)

getUnspecifiedReferenceOptimized

protected NameReference getUnspecifiedReferenceOptimized()
Overrides:
getUnspecifiedReferenceOptimized in class TheOriginalJDTParserClass

goForBlockStatementsopt

public void goForBlockStatementsopt()
Overrides:
goForBlockStatementsopt in class TheOriginalJDTParserClass

goForHeaders

public void goForHeaders()
Overrides:
goForHeaders in class TheOriginalJDTParserClass

goForCompilationUnit

public void goForCompilationUnit()
Overrides:
goForCompilationUnit in class TheOriginalJDTParserClass

goForBlockStatementsOrCatchHeader

public void goForBlockStatementsOrCatchHeader()
Overrides:
goForBlockStatementsOrCatchHeader in class TheOriginalJDTParserClass

identifierSubSet

protected char[][] identifierSubSet(int subsetLength)

indexOfAssistIdentifier

protected int indexOfAssistIdentifier()

indexOfAssistIdentifier

protected int indexOfAssistIdentifier(boolean useGenericsStack)

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

isIndirectlyInsideFieldInitialization

protected boolean isIndirectlyInsideFieldInitialization()

isIndirectlyInsideMethod

protected boolean isIndirectlyInsideMethod()

isIndirectlyInsideType

protected boolean isIndirectlyInsideType()

isInsideAttributeValue

protected boolean isInsideAttributeValue()

isInsideFieldInitialization

protected boolean isInsideFieldInitialization()

isInsideMethod

protected boolean isInsideMethod()

isInsideType

protected boolean isInsideType()

lastIndexOfElement

protected int lastIndexOfElement(int kind)

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.


popElement

protected void popElement(int kind)

popUntilElement

protected void popUntilElement(int kind)

prepareForBlockStatements

protected void prepareForBlockStatements()
Overrides:
prepareForBlockStatements in class TheOriginalJDTParserClass

prepareForHeaders

protected void prepareForHeaders()

pushOnElementStack

protected void pushOnElementStack(int kind)

pushOnElementStack

protected void pushOnElementStack(int kind,
                                  int info)

pushOnElementStack

protected void pushOnElementStack(int kind,
                                  int info,
                                  java.lang.Object objectInfo)

recoveryExitFromVariable

public void recoveryExitFromVariable()
Overrides:
recoveryExitFromVariable in class TheOriginalJDTParserClass

recoveryTokenCheck

public void recoveryTokenCheck()
Overrides:
recoveryTokenCheck in class TheOriginalJDTParserClass

reset

public void reset()

resumeAfterRecovery

protected boolean resumeAfterRecovery()
Overrides:
resumeAfterRecovery in class TheOriginalJDTParserClass

setAssistIdentifier

public abstract void setAssistIdentifier(char[] assistIdent)

topKnownElementInfo

protected int topKnownElementInfo(int owner)

topKnownElementInfo

protected int topKnownElementInfo(int owner,
                                  int offSet)

topKnownElementKind

protected int topKnownElementKind(int owner)

topKnownElementKind

protected int topKnownElementKind(int owner,
                                  int offSet)

topKnownElementObjectInfo

protected java.lang.Object topKnownElementObjectInfo(int owner,
                                                     int offSet)

topKnownElementObjectInfo

protected java.lang.Object topKnownElementObjectInfo(int owner)

wrapWithExplicitConstructorCallIfNeeded

protected ASTNode wrapWithExplicitConstructorCallIfNeeded(ASTNode ast)
If the given ast node is inside an explicit constructor call then wrap it with a fake constructor call. Returns the wrapped completion node or the completion node itself.