Class CompletionJavadocParser
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser
org.aspectj.org.eclipse.jdt.internal.compiler.parser.JavadocParser
org.aspectj.org.eclipse.jdt.internal.codeassist.complete.CompletionJavadocParser
- All Implemented Interfaces:
JavadocTagConstants
Parser specialized for decoding javadoc comments which includes cursor location for code completion.
-
Nested Class Summary
Nested classes/interfaces inherited from interface JavadocTagConstants
JavadocTagConstants.LevelTagsModifier and TypeInterfaceDescriptionstatic final recordA record class representing additional tags to be made available at specific java version levels. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intFields inherited from class JavadocParser
docComment, shouldReportProblemsFields inherited from class AbstractCommentParser
abort, ARGUMENT_RECOVERY, ARGUMENT_TYPE_RECOVERY, AST_STACK_INCREMENT, astLengthPtr, astLengthStack, astPtr, astStack, checkDocComment, COMPIL_PARSER, COMPLETION_PARSER, complianceLevel, deprecated, DOM_PARSER, EMPTY_ARGUMENT_RECOVERY, firstTagPosition, FORMATTER_COMMENT_PARSER, identifierLengthPtr, identifierLengthStack, identifierPositionStack, identifierPtr, identifierStack, index, inheritedPositions, inheritedPositionsPtr, inlineReturn, inlineReturnOpenBraces, inlineReturnStart, inlineTagStart, inlineTagStarted, javadocEnd, javadocStart, javadocTextEnd, javadocTextStart, kind, lastBlockTagValue, lastIdentifierEndPosition, lineEnd, lineEnds, lineStarted, markdown, markdownHelper, memberStart, PARSER_KIND, providesReferencesPtr, providesReferencesStack, QUALIFIED_NAME_RECOVERY, reportProblems, returnStatement, scanner, SELECTION_PARSER, setJavadocPositions, snippetInlineTagStarted, source, SOURCE_PARSER, sourceLevel, sourceParser, starPosition, tagSourceEnd, tagSourceStart, tagValue, TEXT_PARSE, TEXT_VERIF, textStart, tokenPreviousPosition, usesReferencesPtr, usesReferencesStackModifier and TypeFieldDescriptionprotected booleanprotected static final intprotected static final intprotected static final intprotected intprotected int[]protected intprotected Object[]booleanstatic final intstatic final intprotected longprotected booleanstatic final intprotected static final intprotected intstatic final intprotected intprotected int[]protected long[]protected intprotected char[][]protected intprotected long[]protected intprotected booleanprotected intprotected intprotected intprotected booleanprotected intprotected intprotected intprotected intprotected intprotected intprotected intprotected intprotected int[]protected booleanprotected booleanprotected IMarkdownCommentHelperprotected intprotected static final intprotected intprotected TypeReference[]protected static final intbooleanprotected Objectstatic final intbooleanprotected booleanchar[]static final intprotected longprotected Parserprotected intprotected intprotected intprotected intprotected static final intprotected static final intprotected intprotected intprotected intprotected TypeReference[]Fields inherited from interface JavadocTagConstants
ALL_TAGS_LENGTH, BLOCK_IDX, BLOCK_TAGS, BLOCK_TAGS_LENGTH, BLOCK_TAGS_RAW, CLASS_TAGS, COMPILATION_UNIT_TAGS, FIELD_TAGS, HREF_TAG, IN_SNIPPET_TAGS, IN_SNIPPET_TAGS_LENGTH, INLINE_IDX, INLINE_TAGS, INLINE_TAGS_LENGTH, INLINE_TAGS_RAW, JAVADOC_TAG_TYPE, JAVADOC_TAG_TYPE_16PLUS, METHOD_TAGS, MODULE_TAGS, NO_TAG_VALUE, ORDERED_TAGS_NUMBER, PACKAGE_TAGS, PARAM_TAG_EXPECTED_ORDER, SEE_TAG_EXPECTED_ORDER, SNIPPET_IDX, SNIPPET_TAGS_LENGTH, TAG_API_NOTE, TAG_API_NOTE_LENGTH, TAG_API_NOTE_VALUE, TAG_AUTHOR, TAG_AUTHOR_LENGTH, TAG_AUTHOR_VALUE, TAG_CATEGORY, TAG_CATEGORY_LENGTH, TAG_CATEGORY_VALUE, TAG_CODE, TAG_CODE_LENGTH, TAG_CODE_VALUE, TAG_DEPRECATED, TAG_DEPRECATED_LENGTH, TAG_DEPRECATED_VALUE, TAG_DOC_ROOT, TAG_DOC_ROOT_LENGTH, TAG_DOC_ROOT_VALUE, TAG_EXCEPTION, TAG_EXCEPTION_LENGTH, TAG_EXCEPTION_VALUE, TAG_HIDDEN, TAG_HIDDEN_LENGTH, TAG_HIDDEN_VALUE, TAG_HIGHLIGHT, TAG_HIGHLIGHT_LENGTH, TAG_HIGHLIGHT_VALUE, TAG_IMPL_NOTE, TAG_IMPL_NOTE_LENGTH, TAG_IMPL_NOTE_VALUE, TAG_IMPL_SPEC, TAG_IMPL_SPEC_LENGTH, TAG_IMPL_SPEC_VALUE, TAG_INDEX, TAG_INDEX_LENGTH, TAG_INDEX_VALUE, TAG_INHERITDOC, TAG_INHERITDOC_LENGTH, TAG_INHERITDOC_VALUE, TAG_LINK, TAG_LINK_LENGTH, TAG_LINK_VALUE, TAG_LINKPLAIN, TAG_LINKPLAIN_LENGTH, TAG_LINKPLAIN_VALUE, TAG_LITERAL, TAG_LITERAL_LENGTH, TAG_LITERAL_VALUE, TAG_NAMES, TAG_OTHERS_VALUE, TAG_PARAM, TAG_PARAM_LENGTH, TAG_PARAM_VALUE, TAG_PROVIDES, TAG_PROVIDES_LENGTH, TAG_PROVIDES_VALUE, TAG_REPLACE, TAG_REPLACE_LENGTH, TAG_REPLACE_VALUE, TAG_RETURN, TAG_RETURN_LENGTH, TAG_RETURN_VALUE, TAG_SEE, TAG_SEE_LENGTH, TAG_SEE_VALUE, TAG_SERIAL, TAG_SERIAL_DATA, TAG_SERIAL_DATA_LENGTH, TAG_SERIAL_DATA_VALUE, TAG_SERIAL_FIELD, TAG_SERIAL_FIELD_LENGTH, TAG_SERIAL_FIELD_VALUE, TAG_SERIAL_LENGTH, TAG_SERIAL_VALUE, TAG_SINCE, TAG_SINCE_LENGTH, TAG_SINCE_VALUE, TAG_SNIPPET, TAG_SNIPPET_LENGTH, TAG_SNIPPET_VALUE, TAG_SUMMARY, TAG_SUMMARY_LENGTH, TAG_SUMMARY_VALUE, TAG_SYSTEM_PROPERTY, TAG_SYSTEM_PROPERTY_LENGTH, TAG_SYSTEM_PROPERTY_VALUE, TAG_THROWS, TAG_THROWS_LENGTH, TAG_THROWS_VALUE, TAG_TYPE_BLOCK, TAG_TYPE_IN_SNIPPET, TAG_TYPE_INLINE, TAG_TYPE_INLINE_BLOCK, TAG_TYPE_NONE, TAG_USES, TAG_USES_LENGTH, TAG_USES_VALUE, TAG_VALUE, TAG_VALUE_LENGTH, TAG_VALUE_VALUE, TAG_VERSION, TAG_VERSION_LENGTH, TAG_VERSION_VALUE, THROWS_TAG_EXPECTED_ORDERModifier and TypeFieldDescriptionstatic final intstatic final intstatic final char[][][]static final intstatic final JavadocTagConstants.LevelTags[]static final char[][]static final char[][]static final char[][]static final char[]static final char[][][]static final intstatic final intstatic final char[][][]static final intstatic final JavadocTagConstants.LevelTags[]static final short[]static final short[]static final char[][]static final char[][]static final intstatic final intstatic final char[][]static final intstatic final intstatic final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[][]static final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final char[]static final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckDeprecation(int commentPtr) protected booleanprotected ObjectcreateArgumentReference(char[] name, int dim, boolean isVarargs, Object typeRef, long[] dimPositions, long argNamePos) protected ObjectcreateFieldReference(Object receiver) protected ObjectcreateMethodReference(Object receiver, List arguments) protected JavadocModuleReferencecreateModuleReference(int moduleRefTokenCount) protected ObjectcreateModuleTypeReference(TerminalToken primitiveToken, int moduleRefTokenCount) protected ObjectcreateTypeReference(TerminalToken primitiveToken, boolean canBeModule) protected booleanprotected ObjectparseArguments(Object receiver) protected ObjectparseArguments(Object receiver, boolean verifySpaceOrEndComment) protected booleanprotected booleanprotected booleanparseReference(boolean allowModule) protected booleanprotected booleanparseTag(int previousPosition) protected booleanprotected booleanpushParamName(boolean isTypeParam) protected voidpushText(int start, int end) Push text.protected TerminalTokenprotected ObjectsyntaxRecoverArgumentType(Object receiver, List arguments, Object argument) protected ObjectsyntaxRecoverEmptyArgumentType(Object methodRef) protected ObjectsyntaxRecoverQualifiedName(TerminalToken primitiveToken) protected voidprotected booleanMethods inherited from class JavadocParser
addSnippetInnerTag, addTagProperties, areRegionsClosed, closeJavaDocRegion, createReturnStatement, createSnippetInnerTag, createSnippetRegion, createSnippetTag, createTag, createTypeReference, getParsedTypeDeclaration, parseInheritDocTag, parseMarkdownLinks, parseProvidesReference, parseReturn, parseSimpleTag, parseUsesReference, pushExternalSnippetText, pushProvidesReference, pushSeeRef, pushSnippetText, pushThrowName, pushUsesReference, refreshInlineTagPosition, refreshReturnStatement, setRegionPosition, setSnippetError, setSnippetID, setSnippetIsValid, toStringModifier and TypeMethodDescriptionprotected voidaddSnippetInnerTag(Object tag, Object snippetTag) protected voidaddTagProperties(Object Tag, Map<String, Object> map, int tagCount) protected booleanprotected voidcloseJavaDocRegion(String name, Object snippetTag, int end) protected Objectprotected ObjectcreateSnippetInnerTag(String tagName, int start, int end) protected ObjectcreateSnippetRegion(String name, List<Object> tags, Object snippetTag, boolean isDummyRegion, boolean considerPrevTag) protected Objectprotected voidprotected ObjectcreateTypeReference(TerminalToken primitiveToken) protected TypeDeclarationprotected voidprotected booleanparseMarkdownLinks(int previousPosition) protected booleanprotected booleanprotected voidprotected booleanprotected voidpushExternalSnippetText(char[] text, int start, int end, boolean addNewLine, Object snippetTag) protected booleanpushProvidesReference(Object typeRef) protected booleanpushSeeRef(Object statement) protected voidpushSnippetText(char[] text, int start, int end, boolean addNewLine, Object snippetTag) protected booleanpushThrowName(Object typeRef) protected booleanpushUsesReference(Object typeRef) protected voidrefreshInlineTagPosition(int previousPosition) protected voidprotected voidsetRegionPosition(int currentPosition) protected voidsetSnippetError(Object obj, String value) protected voidsetSnippetID(Object tag, String value) protected voidsetSnippetIsValid(Object obj, boolean value) toString()Methods inherited from class AbstractCommentParser
addFragmentToInlineReturn, checkInlineTagForAnnotaion, consumeToken, createFakeReference, getCurrentTokenType, getNumberOfSingleLineCommentInSnippetTag, getTokenEndPosition, indexOfLastSingleComment, parseHref, parseHtmlTag, parseIdentifierTag, parseMember, parseMember, parseQualifiedName, parseQualifiedName, parseSnippetInlineTags, parseURLReference, peekChar, pushIdentifier, pushOnAstStack, readChar, readMarkdownEscapedToken, readTokenAndConsume, readTokenSafely, recordInheritedPosition, setInlineTagStarted, setProjectPath, setProjectSrcClasspath, setSourceComplianceLevel, shouldAbortDueToJavadocTag, syntaxRecoverModuleQualifiedName, updateLineEnd, verifyEndLineModifier and TypeMethodDescriptionprotected voidprotected booleanprotected voidprotected booleancreateFakeReference(int start) protected TerminalTokenprotected intgetNumberOfSingleLineCommentInSnippetTag(String tokenString) protected intintindexOfLastSingleComment(String tokenString, int last) protected booleanprotected booleanparseHtmlTag(int previousPosition, int endTextPosition) Parse a possible HTML tag like: <code> <br> <h?> Note that the default is to do nothing!protected booleanparseIdentifierTag(boolean report) protected ObjectparseMember(Object receiver) protected ObjectparseMember(Object receiver, boolean refInStringLiteral) protected ObjectparseQualifiedName(boolean reset) protected ObjectparseQualifiedName(boolean reset, boolean allowModule) protected ObjectparseSnippetInlineTags(String tokenString, Object snippetTag, Scanner sScanner) protected booleanparseURLReference(int pos, boolean advanceEndPos) protected charpeekChar()protected voidpushIdentifier(boolean newLength, boolean isToken) protected voidpushOnAstStack(Object node, boolean newLength) protected charreadChar()protected booleanreadMarkdownEscapedToken(TerminalToken expectedToken) protected TerminalTokenprotected TerminalTokenprotected voidrecordInheritedPosition(long position) protected voidsetInlineTagStarted(boolean started) voidsetProjectPath(String projectPath) voidsetProjectSrcClasspath(List path) protected voidprotected booleanshouldAbortDueToJavadocTag(int currPos) Scans backwards from current position to find if `{ @` pattern exists before a newline.protected ObjectsyntaxRecoverModuleQualifiedName(TerminalToken primitiveToken, int moduleTokenCount) protected voidprotected booleanverifyEndLine(int textPosition)
-
Field Details
-
INLINE_ALL_TAGS_LENGTH
public static final int INLINE_ALL_TAGS_LENGTH -
BLOCK_ALL_TAGS_LENGTH
public static final int BLOCK_ALL_TAGS_LENGTH -
SNIPPET_ALL_TAGS_LENGTH
public static final int SNIPPET_ALL_TAGS_LENGTH
-
-
Constructor Details
-
CompletionJavadocParser
-
-
Method Details
-
checkDeprecation
public boolean checkDeprecation(int commentPtr) - Overrides:
checkDeprecationin classJavadocParser
-
commentParse
protected boolean commentParse()- Overrides:
commentParsein classAbstractCommentParser
-
createArgumentReference
protected Object createArgumentReference(char[] name, int dim, boolean isVarargs, Object typeRef, long[] dimPositions, long argNamePos) throws InvalidInputException - Overrides:
createArgumentReferencein classJavadocParser- Throws:
InvalidInputException
-
createFieldReference
- Overrides:
createFieldReferencein classJavadocParser- Throws:
InvalidInputException
-
createMethodReference
protected Object createMethodReference(Object receiver, List arguments) throws InvalidInputException - Overrides:
createMethodReferencein classJavadocParser- Throws:
InvalidInputException
-
createTypeReference
- Overrides:
createTypeReferencein classJavadocParser
-
createModuleTypeReference
- Overrides:
createModuleTypeReferencein classJavadocParser
-
createModuleReference
- Overrides:
createModuleReferencein classJavadocParser
-
parseArguments
- Overrides:
parseArgumentsin classAbstractCommentParser- Throws:
InvalidInputException
-
parseArguments
protected Object parseArguments(Object receiver, boolean verifySpaceOrEndComment) throws InvalidInputException - Overrides:
parseArgumentsin classAbstractCommentParser- Throws:
InvalidInputException
-
parseParam
- Overrides:
parseParamin classJavadocParser- Throws:
InvalidInputException
-
parseReference
- Overrides:
parseReferencein classAbstractCommentParser- Throws:
InvalidInputException
-
parseReference
- Overrides:
parseReferencein classAbstractCommentParser- Throws:
InvalidInputException
-
parseTag
- Overrides:
parseTagin classJavadocParser- Throws:
InvalidInputException
-
parseSnippet
- Overrides:
parseSnippetin classAbstractCommentParser- Throws:
InvalidInputException
-
lookForTagsInSnippets
protected boolean lookForTagsInSnippets()- Overrides:
lookForTagsInSnippetsin classAbstractCommentParser
-
parseThrows
protected boolean parseThrows()- Overrides:
parseThrowsin classJavadocParser
-
pushParamName
protected boolean pushParamName(boolean isTypeParam) - Overrides:
pushParamNamein classJavadocParser
-
pushText
protected void pushText(int start, int end) Push text. If it includes completion location, then rescan line to see if there's a possible reference under the cursor location.- Overrides:
pushTextin classJavadocParser- See Also:
-
readToken
- Overrides:
readTokenin classAbstractCommentParser- Throws:
InvalidInputException
-
syntaxRecoverQualifiedName
protected Object syntaxRecoverQualifiedName(TerminalToken primitiveToken) throws InvalidInputException - Overrides:
syntaxRecoverQualifiedNamein classAbstractCommentParser- Throws:
InvalidInputException
-
syntaxRecoverArgumentType
protected Object syntaxRecoverArgumentType(Object receiver, List arguments, Object argument) throws InvalidInputException - Throws:
InvalidInputException
-
syntaxRecoverEmptyArgumentType
- Throws:
InvalidInputException
-
updateDocComment
protected void updateDocComment()- Overrides:
updateDocCommentin classJavadocParser
-
verifySpaceOrEndComment
protected boolean verifySpaceOrEndComment()- Overrides:
verifySpaceOrEndCommentin classAbstractCommentParser
-