Klasse InternalCompletionContext
java.lang.Object
org.aspectj.org.eclipse.jdt.core.CompletionContext
org.aspectj.org.eclipse.jdt.internal.codeassist.InternalCompletionContext
Internal completion context
- Seit:
- 3.1
-
Feldübersicht
Modifizierer und TypFeldBeschreibungprotected char[][]
protected char[][]
protected InternalExtendedCompletionContext
protected boolean
protected int
protected int
protected char[]
protected int
protected int
protected int
protected int
Von Klasse geerbte Felder org.aspectj.org.eclipse.jdt.core.CompletionContext
TL_CONSTRUCTOR_START, TL_IN_IMPORT, TL_MEMBER_START, TL_STATEMENT_START, TOKEN_KIND_NAME, TOKEN_KIND_STRING_LITERAL, TOKEN_KIND_UNKNOWN
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturn the completion node associated with the current completion.Return the parent AST node of the completion node associated with the current completion.Returns the innermost enclosing Java element which contains the completion location ornull
if this element cannot be computed.char[][]
Return keys of expected types of a potential completion proposal at the completion position.char[][]
Return signatures of expected types of a potential completion proposal at the completion position.int
Returns the offset position in the source file buffer after which code assist is requested.char[]
getToken()
Returns the completed token.int
Returns the character index of the end (exclusive) of the subrange in the source file buffer containing the relevant token.int
Returns the kind of completion token being proposed.int
Returns the location of completion token being proposed.int
Returns the character index of the start of the subrange in the source file buffer containing the relevant token being completed.getVisibleElements
(String typeSignature) Return the elements which are visible from the completion location and which can be assigned to the given type.Return the bindings of all visible fields in the current completion context.Return the bindings of all visible local variables in the current completion context.Return the bindings of all visible methods in the current completion context.boolean
Returns whether this completion context is an extended context.boolean
Tell user whether completion takes place in a javadoc comment or not.boolean
Tell user whether completion takes place in a formal reference of a javadoc tag or not.boolean
Tell user whether completion takes place in text area of a javadoc comment or not.protected void
setExpectedTypesKeys
(char[][] expectedTypesKeys) protected void
setExpectedTypesSignatures
(char[][] expectedTypesSignatures) protected void
protected void
setExtendedData
(ITypeRoot typeRoot, CompilationUnitDeclaration compilationUnitDeclaration, LookupEnvironment lookupEnvironment, Scope scope, ASTNode astNode, ASTNode astNodeParent, WorkingCopyOwner owner, CompletionParser parser) protected void
setJavadoc
(int javadoc) protected void
setOffset
(int offset) protected void
setToken
(char[] token) protected void
setTokenKind
(int tokenKind) protected void
setTokenLocation
(int tokenLocation) protected void
setTokenRange
(int start, int end) protected void
setTokenRange
(int start, int end, int endOfEmptyToken)
-
Felddetails
-
expectedTypesSignatures
protected char[][] expectedTypesSignatures -
expectedTypesKeys
protected char[][] expectedTypesKeys -
javadoc
protected int javadoc -
offset
protected int offset -
tokenStart
protected int tokenStart -
tokenEnd
protected int tokenEnd -
token
protected char[] token -
tokenKind
protected int tokenKind -
tokenLocation
protected int tokenLocation -
isExtended
protected boolean isExtended -
extendedContext
-
-
Konstruktordetails
-
InternalCompletionContext
public InternalCompletionContext()
-
-
Methodendetails
-
setExpectedTypesKeys
protected void setExpectedTypesKeys(char[][] expectedTypesKeys) -
setExpectedTypesSignatures
protected void setExpectedTypesSignatures(char[][] expectedTypesSignatures) -
setExtended
protected void setExtended() -
setExtendedData
protected void setExtendedData(ITypeRoot typeRoot, CompilationUnitDeclaration compilationUnitDeclaration, LookupEnvironment lookupEnvironment, Scope scope, ASTNode astNode, ASTNode astNodeParent, WorkingCopyOwner owner, CompletionParser parser) -
setJavadoc
protected void setJavadoc(int javadoc) -
setOffset
protected void setOffset(int offset) -
setToken
protected void setToken(char[] token) -
setTokenKind
protected void setTokenKind(int tokenKind) -
setTokenLocation
protected void setTokenLocation(int tokenLocation) -
setTokenRange
protected void setTokenRange(int start, int end) -
setTokenRange
protected void setTokenRange(int start, int end, int endOfEmptyToken) -
getEnclosingElement
Beschreibung aus Klasse kopiert:CompletionContext
Returns the innermost enclosing Java element which contains the completion location ornull
if this element cannot be computed. The returned Java element and all Java elements in the same compilation unit which can be navigated to from the returned Java element are special Java elements:- they are based on the current content of the compilation unit's buffer, they are not the result of a reconcile operation
- they are not updated if the buffer changes.
- they do not contain local types which are not visible from the completion location.
- they do not give information about categories.
IMember.getCategories()
will return an empty array
null
include:- the compilation unit no longer exists
- the completion occurred in a binary type. However this restriction might be relaxed in the future.
- Setzt außer Kraft:
getEnclosingElement
in KlasseCompletionContext
- Gibt zurück:
- the innermost enclosing Java element which contains the completion location or
null
if this element cannot be computed.
-
getExpectedTypesKeys
public char[][] getExpectedTypesKeys()Beschreibung aus Klasse kopiert:CompletionContext
Return keys of expected types of a potential completion proposal at the completion position. It's not mandatory to a completion proposal to respect this expectation.- Setzt außer Kraft:
getExpectedTypesKeys
in KlasseCompletionContext
- Gibt zurück:
- keys of expected types of a potential completion proposal at the completion position or
null
if there is no expected types. - Siehe auch:
-
getExpectedTypesSignatures
public char[][] getExpectedTypesSignatures()Beschreibung aus Klasse kopiert:CompletionContext
Return signatures of expected types of a potential completion proposal at the completion position. It's not mandatory to a completion proposal to respect this expectation.- Setzt außer Kraft:
getExpectedTypesSignatures
in KlasseCompletionContext
- Gibt zurück:
- signatures expected types of a potential completion proposal at the completion position or
null
if there is no expected types. - Siehe auch:
-
getOffset
public int getOffset()Beschreibung aus Klasse kopiert:CompletionContext
Returns the offset position in the source file buffer after which code assist is requested.- Setzt außer Kraft:
getOffset
in KlasseCompletionContext
- Gibt zurück:
- offset position in the source file buffer
-
getToken
public char[] getToken()Beschreibung aus Klasse kopiert:CompletionContext
Returns the completed token. This token is either the identifier or Java language keyword or the string literal under, immediately preceding, the original request offset. If the original request offset is not within or immediately after an identifier or keyword or a string literal then the returned value isnull
.- Setzt außer Kraft:
getToken
in KlasseCompletionContext
- Gibt zurück:
- completed token or
null
-
getTokenEnd
public int getTokenEnd()Beschreibung aus Klasse kopiert:CompletionContext
Returns the character index of the end (exclusive) of the subrange in the source file buffer containing the relevant token. When there is no relevant token, the range is empty (getTokenEnd() == getTokenStart() - 1
).- Setzt außer Kraft:
getTokenEnd
in KlasseCompletionContext
- Gibt zurück:
- character index of token end position (exclusive)
-
getTokenKind
public int getTokenKind()Beschreibung aus Klasse kopiert:CompletionContext
Returns the kind of completion token being proposed.The set of different kinds of completion token is expected to change over time. It is strongly recommended that clients do not assume that the kind is one of the ones they know about, and code defensively for the possibility of unexpected future growth.
- Setzt außer Kraft:
getTokenKind
in KlasseCompletionContext
- Gibt zurück:
- the kind; one of the kind constants declared on
this class whose name starts with
TOKEN_KIND
, or possibly a kind unknown to the caller
-
getTokenLocation
public int getTokenLocation()Beschreibung aus Klasse kopiert:CompletionContext
Returns the location of completion token being proposed. The returned location is a bit mask which can contain some values of the constants declared on this class whose name starts withTL
, or possibly values unknown to the caller.The set of different location values is expected to change over time. It is strongly recommended that clients do not assume that the location contains only known value, and code defensively for the possibility of unexpected future growth.
- Setzt außer Kraft:
getTokenLocation
in KlasseCompletionContext
- Gibt zurück:
- the location
-
getTokenStart
public int getTokenStart()Beschreibung aus Klasse kopiert:CompletionContext
Returns the character index of the start of the subrange in the source file buffer containing the relevant token being completed. This token is either the identifier or Java language keyword under, or immediately preceding, the original request offset. If the original request offset is not within or immediately after an identifier or keyword, then the position returned is original request offset and the token range is empty.- Setzt außer Kraft:
getTokenStart
in KlasseCompletionContext
- Gibt zurück:
- character index of token start position (inclusive)
-
getVisibleElements
Beschreibung aus Klasse kopiert:CompletionContext
Return the elements which are visible from the completion location and which can be assigned to the given type. An element is assignable if its type can be assigned to a variable of the given type, as specified in section 5.2 of The Java Language Specification, Third Edition (JLS3). A visible element is either:- a
ILocalVariable
- the element type isILocalVariable.getTypeSignature()
- a
IField
- the element type isIField.getTypeSignature()
- a
IMethod
- the element type isIMethod.getReturnType()
- they are based on the current content of the compilation unit's buffer, they are not the result of a reconcile operation
- they are not updated if the buffer changes.
- they do not contain local types which are not visible from the completion location.
- they do not give information about categories.
IMember.getCategories()
will return an empty array
- the compilation unit no longer exists
- the completion occurred in a binary type. However this restriction might be relaxed in the future.
- Setzt außer Kraft:
getVisibleElements
in KlasseCompletionContext
- Parameter:
typeSignature
- elements which can be assigned to this type are returned. Ifnull
there is no constraint on the type of the returned elements.- Gibt zurück:
- elements which are visible from the completion location and which can be assigned to the given type.
- Siehe auch:
- a
-
isExtended
public boolean isExtended()Beschreibung aus Klasse kopiert:CompletionContext
Returns whether this completion context is an extended context. Some methods of this context can be used only if this context is an extended context but an extended context consumes more memory.- Setzt außer Kraft:
isExtended
in KlasseCompletionContext
- Gibt zurück:
true
if this completion context is an extended context.
-
isInJavadoc
public boolean isInJavadoc()Beschreibung aus Klasse kopiert:CompletionContext
Tell user whether completion takes place in a javadoc comment or not.- Setzt außer Kraft:
isInJavadoc
in KlasseCompletionContext
- Gibt zurück:
- boolean true if completion takes place in a javadoc comment, false otherwise.
-
isInJavadocFormalReference
public boolean isInJavadocFormalReference()Beschreibung aus Klasse kopiert:CompletionContext
Tell user whether completion takes place in a formal reference of a javadoc tag or not. Tags with formal reference are:- @see
- @throws
- @exception
- {@link Object}
- {@linkplain Object}
- {@value} when compiler compliance is set at leats to 1.5
- Setzt außer Kraft:
isInJavadocFormalReference
in KlasseCompletionContext
- Gibt zurück:
- boolean true if completion takes place in formal reference of a javadoc tag, false otherwise.
-
isInJavadocText
public boolean isInJavadocText()Beschreibung aus Klasse kopiert:CompletionContext
Tell user whether completion takes place in text area of a javadoc comment or not.- Setzt außer Kraft:
isInJavadocText
in KlasseCompletionContext
- Gibt zurück:
- boolean true if completion takes place in a text area of a javadoc comment, false otherwise.
-
getCompletionNode
Return the completion node associated with the current completion.- Gibt zurück:
- completion AST node, or null if the extendedContext is null.
- Löst aus:
UnsupportedOperationException
- if the context is not an extended context- Siehe auch:
-
getCompletionNodeParent
Return the parent AST node of the completion node associated with the current completion.- Gibt zurück:
- completion parent AST node, or null if the extendedContext is null.
- Löst aus:
UnsupportedOperationException
- if the context is not an extended context- Siehe auch:
-
getVisibleLocalVariables
Return the bindings of all visible local variables in the current completion context.- Gibt zurück:
- bindings of all visible local variables, or null if the extendedContext is null. Returned bindings are instances of
LocalVariableBinding
- Löst aus:
UnsupportedOperationException
- if the context is not an extended context- Siehe auch:
-
getVisibleFields
Return the bindings of all visible fields in the current completion context.- Gibt zurück:
- bindings of all visible fields, or null if the extendedContext is null. Returned bindings are instances of
FieldBinding
- Löst aus:
UnsupportedOperationException
- if the context is not an extended context- Siehe auch:
-
getVisibleMethods
Return the bindings of all visible methods in the current completion context.- Gibt zurück:
- bindings of all visible methods, or null if the extendedContext is null. Returned bindings are instances of
MethodBinding
- Löst aus:
UnsupportedOperationException
- if the context is not an extended context- Siehe auch:
-