Klasse InternalCompletionProposal
- Seit:
- 3.1
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected intprotected CompletionEngineprotected char[]protected char[]protected booleanprotected char[]protected NameLookupprotected char[]protected char[]protected char[][]protected char[][]protected char[]Von Klasse geerbte Felder org.aspectj.org.eclipse.jdt.core.CompletionProposal
ANNOTATION_ATTRIBUTE_REF, ANONYMOUS_CLASS_CONSTRUCTOR_INVOCATION, ANONYMOUS_CLASS_DECLARATION, CONSTRUCTOR_INVOCATION, FIELD_IMPORT, FIELD_REF, FIELD_REF_WITH_CASTED_RECEIVER, FIRST_KIND, JAVADOC_BLOCK_TAG, JAVADOC_FIELD_REF, JAVADOC_INLINE_TAG, JAVADOC_METHOD_REF, JAVADOC_PARAM_REF, JAVADOC_TYPE_REF, JAVADOC_VALUE_REF, KEYWORD, LABEL_REF, LAMBDA_EXPRESSION, LAST_KIND, LOCAL_VARIABLE_REF, METHOD_DECLARATION, METHOD_IMPORT, METHOD_NAME_REFERENCE, METHOD_REF, METHOD_REF_WITH_CASTED_RECEIVER, MODULE_DECLARATION, MODULE_REF, PACKAGE_REF, POTENTIAL_METHOD_DECLARATION, TYPE_IMPORT, TYPE_REF, VARIABLE_DECLARATION -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungInternalCompletionProposal(int kind, int completionLocation) Creates a basic completion proposal. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleancanUseDiamond(CompletionContext coreContext) Returns whether it is safe to use the 'Ungültige Eingabe: "<">' (diamond) operator in place of explicitly specifying type arguments for this proposal.protected char[][]findConstructorParameterNames(char[] declaringTypePackageName, char[] declaringTypeName, char[] selector, char[][] paramTypeNames) protected char[][]findMethodParameterNames(char[] declaringTypePackageName, char[] declaringTypeName, char[] selector, char[][] paramTypeNames) char[][]findParameterNames(org.eclipse.core.runtime.IProgressMonitor monitor) Finds the method parameter names.intReturns the accessibility of the proposal.intReturns the completion flags relevant in the context, orCompletionFlags.Defaultif none.Returns a binding of the method or field corresponding to this proposal ornullif none.char[]Returns the proposed sequence of characters to insert into the source file buffer, replacing the characters at the specified source range.intReturns the character index in the source file buffer where source completion was requested (theoffsetparameter toICodeAssist.codeCompleteminus one).char[]Returns the key of the relevant declaration in the context, ornullif none.protected char[]char[]Returns the type signature or package name or module name (9) of the relevant declaration in the context, ornullif none.protected char[]intgetFlags()Returns the modifier flags relevant in the context, orFlags.AccDefaultif none.char[]getKey()Returns the key relevant in the context, ornullif none.intgetKind()Returns the kind of completion being proposed.protected char[]char[]getName()Returns the simple name of the method, field, member, or variable relevant in the context, ornullif none.protected char[]protected char[][]protected char[][]intReturns the character index of the end (exclusive) of the subrange in the source file buffer containing the relevant receiver of the member being completedchar[]Returns the type signature or package name of the relevant receiver in the context, ornullif none.intReturns the character index of the start of the subrange in the source file buffer containing the relevant receiver of the member being completed.intReturns the relative relevance rating of this proposal.intReturns the character index of the end of the subrange in the source file buffer to be replaced by the completion string.intReturns the character index of the start of the subrange in the source file buffer to be replaced by the completion string.Returns the required completion proposals.char[]Returns the signature of the method or type relevant in the context, ornullif none.intReturns the character index of the end (exclusive) of the subrange in the source file buffer containing the relevant token.intReturns the character index of the start of the subrange in the source file buffer containing the relevant token being completed.protected char[]booleanReturns whether this proposal is a constructor.protected voidsetAccessibility(int kind) voidsetAdditionalFlags(int additionalFlags) Sets the completion flags relevant in the context.voidsetBinding(Binding binding) voidsetCompletion(char[] completion) Sets the proposed sequence of characters to insert into the source file buffer, replacing the characters at the specified source range.voidsetDeclarationKey(char[] key) Sets the type or package key of the relevant declaration in the context, ornullif none.protected voidsetDeclarationPackageName(char[] declarationPackageName) voidsetDeclarationSignature(char[] signature) Sets the type or package signature or module name (9) of the relevant declaration in the context, ornullif none.protected voidsetDeclarationTypeName(char[] declarationTypeName) voidsetFlags(int flags) Sets the modifier flags relevant in the context.voidsetHasNoParameterNamesFromIndex(boolean hasNoParameterNamesFromIndex) protected voidsetIsContructor(boolean isConstructor) voidsetKey(char[] key) Sets the key of the method, field type, member type, relevant in the context, ornullif none.protected voidsetModuleName(char[] moduleName) voidsetName(char[] name) Sets the simple name of the method (type simple name for constructor), field, member, or variable relevant in the context, ornullif none.voidsetOriginalSignature(char[] originalSignature) protected voidsetPackageName(char[] packageName) voidsetParameterNames(char[][] parameterNames) Sets the method parameter names.protected voidsetParameterPackageNames(char[][] parameterPackageNames) protected voidsetParameterTypeNames(char[][] parameterTypeNames) voidsetReceiverRange(int startIndex, int endIndex) Sets the character indices of the subrange in the source file buffer containing the relevant receiver of the member being completed.voidsetReceiverSignature(char[] signature) Sets the type or package signature of the relevant receiver in the context, ornullif none.voidsetRelevance(int rating) Sets the relative relevance rating of this proposal.voidsetReplaceRange(int startIndex, int endIndex) Sets the character indices of the subrange in the source file buffer to be replaced by the completion string.voidsetRequiredProposals(CompletionProposal[] proposals) Sets the list of required completion proposals, ornullif none.voidsetSignature(char[] signature) Sets the signature of the method, field type, member type, relevant in the context, ornullif none.voidsetTokenRange(int startIndex, int endIndex) Sets the character indices of the subrange in the source file buffer containing the relevant token being completed.protected voidsetTypeName(char[] typeName) toString()Von Klasse geerbte Methoden org.aspectj.org.eclipse.jdt.core.CompletionProposal
create
-
Felddetails
-
completionEngine
-
nameLookup
-
declarationPackageName
protected char[] declarationPackageName -
declarationTypeName
protected char[] declarationTypeName -
moduleName
protected char[] moduleName -
packageName
protected char[] packageName -
typeName
protected char[] typeName -
parameterPackageNames
protected char[][] parameterPackageNames -
parameterTypeNames
protected char[][] parameterTypeNames -
originalSignature
protected char[] originalSignature -
accessibility
protected int accessibility -
isConstructor
protected boolean isConstructor
-
-
Konstruktordetails
-
InternalCompletionProposal
public InternalCompletionProposal(int kind, int completionLocation) Creates a basic completion proposal. All instance field have plausible default values unless otherwise noted.Note that the constructors for this class are internal to the Java model implementation. Clients cannot directly create CompletionProposal objects.
- Parameter:
kind- one of the kind constants declared on this classcompletionLocation- original offset of code completion request
-
-
Methodendetails
-
findConstructorParameterNames
protected char[][] findConstructorParameterNames(char[] declaringTypePackageName, char[] declaringTypeName, char[] selector, char[][] paramTypeNames) -
findMethodParameterNames
protected char[][] findMethodParameterNames(char[] declaringTypePackageName, char[] declaringTypeName, char[] selector, char[][] paramTypeNames) -
getDeclarationPackageName
protected char[] getDeclarationPackageName() -
getDeclarationTypeName
protected char[] getDeclarationTypeName() -
getModuleName
protected char[] getModuleName() -
getPackageName
protected char[] getPackageName() -
getTypeName
protected char[] getTypeName() -
getParameterPackageNames
protected char[][] getParameterPackageNames() -
getParameterTypeNames
protected char[][] getParameterTypeNames() -
setDeclarationPackageName
protected void setDeclarationPackageName(char[] declarationPackageName) -
setDeclarationTypeName
protected void setDeclarationTypeName(char[] declarationTypeName) -
setModuleName
protected void setModuleName(char[] moduleName) -
setPackageName
protected void setPackageName(char[] packageName) -
setTypeName
protected void setTypeName(char[] typeName) -
setParameterPackageNames
protected void setParameterPackageNames(char[][] parameterPackageNames) -
setParameterTypeNames
protected void setParameterTypeNames(char[][] parameterTypeNames) -
setAccessibility
protected void setAccessibility(int kind) -
setIsContructor
protected void setIsContructor(boolean isConstructor) -
setOriginalSignature
public void setOriginalSignature(char[] originalSignature) -
getAdditionalFlags
public int getAdditionalFlags()Beschreibung aus Klasse kopiert:CompletionProposalReturns the completion flags relevant in the context, orCompletionFlags.Defaultif none.This field is available for the following kinds of completion proposals:
FIELD_IMPORT- completion flags of the attribute that is referenced. Completion flags for this proposal kind can only includeCompletionFlags.StaticImportMETHOD_IMPORT- completion flags of the attribute that is referenced. Completion flags for this proposal kind can only includeCompletionFlags.StaticImportTYPE_IMPORT- completion flags of the attribute that is referenced. Completion flags for this proposal kind can only includeCompletionFlags.StaticImport
CompletionFlags.Default.- Setzt außer Kraft:
getAdditionalFlagsin KlasseCompletionProposal- Gibt zurück:
- the completion flags, or
CompletionFlags.Defaultif none - Siehe auch:
-
setAdditionalFlags
public void setAdditionalFlags(int additionalFlags) Beschreibung aus Klasse kopiert:CompletionProposalSets the completion flags relevant in the context.If not set, defaults to none.
The completion engine creates instances of this class and sets its properties; this method is not intended to be used by other clients.
- Setzt außer Kraft:
setAdditionalFlagsin KlasseCompletionProposal- Parameter:
additionalFlags- the completion flags, orCompletionFlags.Defaultif none
-
getKind
public int getKind()Beschreibung aus Klasse kopiert:CompletionProposalReturns the kind of completion being proposed.The set of different kinds of completion proposals 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:
getKindin KlasseCompletionProposal- Gibt zurück:
- the kind; one of the kind constants declared on this class, or possibly a kind unknown to the caller
-
getCompletionLocation
public int getCompletionLocation()Beschreibung aus Klasse kopiert:CompletionProposalReturns the character index in the source file buffer where source completion was requested (theoffsetparameter toICodeAssist.codeCompleteminus one).- Setzt außer Kraft:
getCompletionLocationin KlasseCompletionProposal- Gibt zurück:
- character index in source file buffer
- Siehe auch:
-
getTokenStart
public int getTokenStart()Beschreibung aus Klasse kopiert:CompletionProposalReturns 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:
getTokenStartin KlasseCompletionProposal- Gibt zurück:
- character index of token start position (inclusive)
-
getTokenEnd
public int getTokenEnd()Beschreibung aus Klasse kopiert:CompletionProposalReturns 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 (getEndToken() == getStartToken()).- Setzt außer Kraft:
getTokenEndin KlasseCompletionProposal- Gibt zurück:
- character index of token end position (exclusive)
-
setTokenRange
public void setTokenRange(int startIndex, int endIndex) Beschreibung aus Klasse kopiert:CompletionProposalSets the character indices 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 source range begins at original request offset and is empty.If not set, defaults to empty subrange at [0,0).
- Setzt außer Kraft:
setTokenRangein KlasseCompletionProposal- Parameter:
startIndex- character index of token start position (inclusive)endIndex- character index of token end position (exclusive)
-
getCompletion
public char[] getCompletion()Beschreibung aus Klasse kopiert:CompletionProposalReturns the proposed sequence of characters to insert into the source file buffer, replacing the characters at the specified source range. The string can be arbitrary; for example, it might include not only the name of a method but a set of parentheses.The client must not modify the array returned.
- Setzt außer Kraft:
getCompletionin KlasseCompletionProposal- Gibt zurück:
- the completion string
-
setCompletion
public void setCompletion(char[] completion) Beschreibung aus Klasse kopiert:CompletionProposalSets the proposed sequence of characters to insert into the source file buffer, replacing the characters at the specified source range. The string can be arbitrary; for example, it might include not only the name of a method but a set of parentheses.If not set, defaults to an empty character array.
The completion engine creates instances of this class and sets its properties; this method is not intended to be used by other clients.
- Setzt außer Kraft:
setCompletionin KlasseCompletionProposal- Parameter:
completion- the completion string
-
getReplaceStart
public int getReplaceStart()Beschreibung aus Klasse kopiert:CompletionProposalReturns the character index of the start of the subrange in the source file buffer to be replaced by the completion string. If the subrange is empty (getReplaceEnd() == getReplaceStart()), the completion string is to be inserted at this index.Note that while the token subrange is precisely specified, the replacement range is loosely constrained and may not bear any direct relation to the original request offset. For example, it would be possible for a type completion to propose inserting an import declaration at the top of the compilation unit; or the completion might include trailing parentheses and punctuation for a method completion.
- Setzt außer Kraft:
getReplaceStartin KlasseCompletionProposal- Gibt zurück:
- replacement start position (inclusive)
-
getReplaceEnd
public int getReplaceEnd()Beschreibung aus Klasse kopiert:CompletionProposalReturns the character index of the end of the subrange in the source file buffer to be replaced by the completion string. If the subrange is empty (getReplaceEnd() == getReplaceStart()), the completion string is to be inserted at this index.- Setzt außer Kraft:
getReplaceEndin KlasseCompletionProposal- Gibt zurück:
- replacement end position (exclusive)
-
setReplaceRange
public void setReplaceRange(int startIndex, int endIndex) Beschreibung aus Klasse kopiert:CompletionProposalSets the character indices of the subrange in the source file buffer to be replaced by the completion string. If the subrange is empty (startIndex == endIndex), the completion string is to be inserted at this index.If not set, defaults to empty subrange at [0,0).
The completion engine creates instances of this class and sets its properties; this method is not intended to be used by other clients.
- Setzt außer Kraft:
setReplaceRangein KlasseCompletionProposal- Parameter:
startIndex- character index of replacement start position (inclusive)endIndex- character index of replacement end position (exclusive)
-
getRelevance
public int getRelevance()Beschreibung aus Klasse kopiert:CompletionProposalReturns the relative relevance rating of this proposal.- Setzt außer Kraft:
getRelevancein KlasseCompletionProposal- Gibt zurück:
- relevance rating of this proposal; ratings are positive; higher means better
-
setRelevance
public void setRelevance(int rating) Beschreibung aus Klasse kopiert:CompletionProposalSets the relative relevance rating of this proposal.If not set, defaults to the lowest possible rating (1).
The completion engine creates instances of this class and sets its properties; this method is not intended to be used by other clients.
- Setzt außer Kraft:
setRelevancein KlasseCompletionProposal- Parameter:
rating- relevance rating of this proposal; ratings are positive; higher means better
-
getDeclarationSignature
public char[] getDeclarationSignature()Beschreibung aus Klasse kopiert:CompletionProposalReturns the type signature or package name or module name (9) of the relevant declaration in the context, ornullif none.This field is available for the following kinds of completion proposals:
ANNOTATION_ATTRIBUT_REF- type signature of the annotation that declares the attribute that is referencedANONYMOUS_CLASS_DECLARATION- type signature of the type that is being subclassed or implementedFIELD_IMPORT- type signature of the type that declares the field that is importedFIELD_REF- type signature of the type that declares the field that is referencedFIELD_REF_WITH_CASTED_RECEIVER- type signature of the type that declares the field that is referencedMETHOD_IMPORT- type signature of the type that declares the method that is importedMETHOD_REF- type signature of the type that declares the method that is referencedMETHOD_REF_WITH_CASTED_RECEIVER- type signature of the type that declares the method that is referencedMETHOD_DECLARATION- type signature of the type that declares the method that is being implemented or overriddenMODULE_DECLARATION- possible name of the module that is being declaredMODULE_REF- name of the module that is referencedPACKAGE_REF- dot-based package name of the package that is referencedTYPE_IMPORT- dot-based package name of the package containing the type that is importedTYPE_REF- dot-based package name of the package containing the type that is referencedPOTENTIAL_METHOD_DECLARATION- type signature of the type that declares the method that is being created
null. Clients must not modify the array returned.- Setzt außer Kraft:
getDeclarationSignaturein KlasseCompletionProposal- Gibt zurück:
- a type signature or a package name or module name (9) (depending
on the kind of completion), or
nullif none - Siehe auch:
-
getDeclarationKey
public char[] getDeclarationKey()Beschreibung aus Klasse kopiert:CompletionProposalReturns the key of the relevant declaration in the context, ornullif none.This field is available for the following kinds of completion proposals:
ANONYMOUS_CLASS_DECLARATION- key of the type that is being subclassed or implementedMETHOD_DECLARATION- key of the type that declares the method that is being implemented or overridden
null. Clients must not modify the array returned.- Setzt außer Kraft:
getDeclarationKeyin KlasseCompletionProposal- Gibt zurück:
- a key, or
nullif none - Siehe auch:
-
setDeclarationSignature
public void setDeclarationSignature(char[] signature) Beschreibung aus Klasse kopiert:CompletionProposalSets the type or package signature or module name (9) of the relevant declaration in the context, ornullif none.If not set, defaults to none.
The completion engine creates instances of this class and sets its properties; this method is not intended to be used by other clients.
- Setzt außer Kraft:
setDeclarationSignaturein KlasseCompletionProposal- Parameter:
signature- the type or package signature or module name(9) , ornullif none
-
setDeclarationKey
public void setDeclarationKey(char[] key) Beschreibung aus Klasse kopiert:CompletionProposalSets the type or package key of the relevant declaration in the context, ornullif none.If not set, defaults to none.
The completion engine creates instances of this class and sets its properties; this method is not intended to be used by other clients.
- Setzt außer Kraft:
setDeclarationKeyin KlasseCompletionProposal- Parameter:
key- the type or package key, ornullif none
-
getName
public char[] getName()Beschreibung aus Klasse kopiert:CompletionProposalReturns the simple name of the method, field, member, or variable relevant in the context, ornullif none.This field is available for the following kinds of completion proposals:
ANNOTATION_ATTRIBUT_REF- the name of the attributeFIELD_IMPORT- the name of the fieldFIELD_REF- the name of the fieldFIELD_REF_WITH_CASTED_RECEIVER- the name of the fieldKEYWORD- the keywordLABEL_REF- the name of the labelLOCAL_VARIABLE_REF- the name of the local variableMETHOD_IMPORT- the name of the methodMETHOD_REF- the name of the method (the type simple name for constructor)METHOD_REF_WITH_CASTED_RECEIVER- the name of the methodMETHOD_DECLARATION- the name of the method (the type simple name for constructor)VARIABLE_DECLARATION- the name of the variablePOTENTIAL_METHOD_DECLARATION- the name of the method
null. Clients must not modify the array returned.- Setzt außer Kraft:
getNamein KlasseCompletionProposal- Gibt zurück:
- the keyword, field, method, local variable, or member
name, or
nullif none
-
setName
public void setName(char[] name) Beschreibung aus Klasse kopiert:CompletionProposalSets the simple name of the method (type simple name for constructor), field, member, or variable relevant in the context, ornullif none.If not set, defaults to none.
The completion engine creates instances of this class and sets its properties; this method is not intended to be used by other clients.
- Setzt außer Kraft:
setNamein KlasseCompletionProposal- Parameter:
name- the keyword, field, method, local variable, or member name, ornullif none
-
getBinding
Returns a binding of the method or field corresponding to this proposal ornullif none.The binding may be available for the following kinds of completion proposals:
ANONYMOUS_CLASS_CONSTRUCTOR_INVOCATION-MethodBindingof the constructor being proposedCONSTRUCTOR_INVOCATION-MethodBindingof the constructor being proposedFIELD_REF-FieldBindingof the field being proposedFIELD_REF_WITH_CASTED_RECEIVER-FieldBindingof the field being proposedJAVADOC_FIELD_REF-FieldBindingof the field being proposedJAVADOC_METHOD_REF-MethodBindingof the method or constructor being proposedMETHOD_DECLARATION-MethodBindingof the method or constructor being proposedMETHOD_NAME_REFERENCE-MethodBindingof the method or constructor being proposedMETHOD_REF-MethodBindingof the method or constructor being proposedMETHOD_REF_WITH_CASTED_RECEIVER-MethodBindingof the method or constructor being proposed
null.- Gibt zurück:
- the binding corresponding to this proposal (if available), or
nullif none
-
setBinding
-
getSignature
public char[] getSignature()Beschreibung aus Klasse kopiert:CompletionProposalReturns the signature of the method or type relevant in the context, ornullif none.This field is available for the following kinds of completion proposals:
ANNOTATION_ATTRIBUT_REF- the type signature of the referenced attribute's typeANONYMOUS_CLASS_DECLARATION- method signature of the constructor that is being invokedFIELD_IMPORT- the type signature of the referenced field's typeFIELD_REF- the type signature of the referenced field's typeFIELD_REF_WITH_CASTED_RECEIVER- the type signature of the referenced field's typeLOCAL_VARIABLE_REF- the type signature of the referenced local variable's typeMETHOD_IMPORT- method signature of the method that is importedMETHOD_REF- method signature of the method that is referencedMETHOD_REF_WITH_CASTED_RECEIVER- method signature of the method that is referencedMETHOD_DECLARATION- method signature of the method that is being implemented or overriddenTYPE_IMPORT- type signature of the type that is importedTYPE_REF- type signature of the type that is referencedVARIABLE_DECLARATION- the type signature of the type of the variable being declaredPOTENTIAL_METHOD_DECLARATION- method signature of the method that is being created
null. Clients must not modify the array returned.- Setzt außer Kraft:
getSignaturein KlasseCompletionProposal- Gibt zurück:
- the signature, or
nullif none - Siehe auch:
-
getKey
public char[] getKey()Beschreibung aus Klasse kopiert:CompletionProposalReturns the key relevant in the context, ornullif none.This field is available for the following kinds of completion proposals:
ANONYMOUS_CLASS_DECLARATION- method key of the constructor that is being invoked, ornullif the declaring type is an interfaceMETHOD_DECLARATION- method key of the method that is being implemented or overridden
null. Clients must not modify the array returned.- Setzt außer Kraft:
getKeyin KlasseCompletionProposal- Gibt zurück:
- the key, or
nullif none - Siehe auch:
-
setSignature
public void setSignature(char[] signature) Beschreibung aus Klasse kopiert:CompletionProposalSets the signature of the method, field type, member type, relevant in the context, ornullif none.If not set, defaults to none.
The completion engine creates instances of this class and sets its properties; this method is not intended to be used by other clients.
- Setzt außer Kraft:
setSignaturein KlasseCompletionProposal- Parameter:
signature- the signature, ornullif none
-
setKey
public void setKey(char[] key) Beschreibung aus Klasse kopiert:CompletionProposalSets the key of the method, field type, member type, relevant in the context, ornullif none.If not set, defaults to none.
The completion engine creates instances of this class and sets its properties; this method is not intended to be used by other clients.
- Setzt außer Kraft:
setKeyin KlasseCompletionProposal- Parameter:
key- the key, ornullif none
-
getFlags
public int getFlags()Beschreibung aus Klasse kopiert:CompletionProposalReturns the modifier flags relevant in the context, orFlags.AccDefaultif none.This field is available for the following kinds of completion proposals:
ANNOTATION_ATTRIBUT_REF- modifier flags of the attribute that is referenced;ANONYMOUS_CLASS_DECLARATION- modifier flags of the constructor that is referencedFIELD_IMPORT- modifier flags of the field that is imported.FIELD_REF- modifier flags of the field that is referenced;Flags.AccEnumcan be used to recognize references to enum constantsFIELD_REF_WITH_CASTED_RECEIVER- modifier flags of the field that is referenced.KEYWORD- modifier flag corresponding to the modifier keywordLOCAL_VARIABLE_REF- modifier flags of the local variable that is referencedMETHOD_IMPORT- modifier flags of the method that is imported;METHOD_REF- modifier flags of the method that is referenced;Flags.AccAnnotationcan be used to recognize references to annotation type membersMETHOD_REF_WITH_CASTED_RECEIVER- modifier flags of the method that is referenced.METHOD_DECLARATION- modifier flags for the method that is being implemented or overriddenTYPE_IMPORT- modifier flags of the type that is imported;Flags.AccInterfacecan be used to recognize references to interfaces,Flags.AccEnumenum types, andFlags.AccAnnotationannotation typesTYPE_REF- modifier flags of the type that is referenced;Flags.AccInterfacecan be used to recognize references to interfaces,Flags.AccEnumenum types, andFlags.AccAnnotationannotation typesVARIABLE_DECLARATION- modifier flags for the variable being declaredPOTENTIAL_METHOD_DECLARATION- modifier flags for the method that is being created
Flags.AccDefault.- Setzt außer Kraft:
getFlagsin KlasseCompletionProposal- Gibt zurück:
- the modifier flags, or
Flags.AccDefaultif none - Siehe auch:
-
setFlags
public void setFlags(int flags) Beschreibung aus Klasse kopiert:CompletionProposalSets the modifier flags relevant in the context.If not set, defaults to none.
The completion engine creates instances of this class and sets its properties; this method is not intended to be used by other clients.
- Setzt außer Kraft:
setFlagsin KlasseCompletionProposal- Parameter:
flags- the modifier flags, orFlags.AccDefaultif none
-
setHasNoParameterNamesFromIndex
public void setHasNoParameterNamesFromIndex(boolean hasNoParameterNamesFromIndex) -
getRequiredProposals
Beschreibung aus Klasse kopiert:CompletionProposalReturns the required completion proposals. The proposal can be apply only if these required completion proposals are also applied. If the required proposal aren't applied the completion could create completion problems.This field is available for the following kinds of completion proposals:
FIELD_REF- The allowed required proposals for this kind are:TYPE_REFTYPE_IMPORTFIELD_IMPORT
METHOD_REF- The allowed required proposals for this kind are:TYPE_REFTYPE_IMPORTMETHOD_IMPORT
TYPE_REF- The allowed required proposals for this kind are:TYPE_REF
CONSTRUCTOR_INVOCATION- The allowed required proposals for this kind are:TYPE_REF
ANONYMOUS_CLASS_CONSTRUCTOR_INVOCATION- The allowed required proposals for this kind are:TYPE_REF
ANONYMOUS_CLASS_DECLARATION- The allowed required proposals for this kind are:TYPE_REF
Other kinds of required proposals will be returned in the future, therefore clients of this API must allow with
CompletionRequestor.setAllowsRequiredProposals(int, int, boolean)only kinds which are in this list to avoid unexpected results in the future.A required proposal of a given kind is proposed even if
CompletionRequestor.isIgnored(int)returntruefor that kind.A required completion proposal cannot have required completion proposals.
- Setzt außer Kraft:
getRequiredProposalsin KlasseCompletionProposal- Gibt zurück:
- the required completion proposals, or
nullif none. - Siehe auch:
-
setRequiredProposals
Beschreibung aus Klasse kopiert:CompletionProposalSets the list of required completion proposals, ornullif none.If not set, defaults to none.
The completion engine creates instances of this class and sets its properties; this method is not intended to be used by other clients.
- Setzt außer Kraft:
setRequiredProposalsin KlasseCompletionProposal- Parameter:
proposals- the list of required completion proposals, ornullif none
-
findParameterNames
public char[][] findParameterNames(org.eclipse.core.runtime.IProgressMonitor monitor) Beschreibung aus Klasse kopiert:CompletionProposalFinds the method parameter names. This information is relevant to method reference (and method declaration proposals). Returnsnullif not available or not relevant.The client must not modify the array returned.
Note that this is an expensive thing to compute, which may require parsing Java source files, etc. Use sparingly.
- Setzt außer Kraft:
findParameterNamesin KlasseCompletionProposal- Parameter:
monitor- the progress monitor, ornullif none- Gibt zurück:
- the parameter names, or
nullif none or not available or not relevant
-
setParameterNames
public void setParameterNames(char[][] parameterNames) Beschreibung aus Klasse kopiert:CompletionProposalSets the method parameter names. This information is relevant to method reference (and method declaration proposals).The completion engine creates instances of this class and sets its properties; this method is not intended to be used by other clients.
- Setzt außer Kraft:
setParameterNamesin KlasseCompletionProposal- Parameter:
parameterNames- the parameter names, ornullif none
-
getAccessibility
public int getAccessibility()Beschreibung aus Klasse kopiert:CompletionProposalReturns the accessibility of the proposal.This field is available for the following kinds of completion proposals:
TYPE_REF- accessibility of the type
IAccessRule.K_ACCESSIBLEorIAccessRule.K_DISCOURAGEDorIAccessRule.K_NON_ACCESSIBLE. By default this method returnIAccessRule.K_ACCESSIBLE.- Setzt außer Kraft:
getAccessibilityin KlasseCompletionProposal- Gibt zurück:
- the accessibility of the proposal
- Siehe auch:
-
isConstructor
public boolean isConstructor()Beschreibung aus Klasse kopiert:CompletionProposalReturns whether this proposal is a constructor.This field is available for the following kinds of completion proposals:
METHOD_REF- returntrueif the referenced method is a constructorMETHOD_DECLARATION- returntrueif the declared method is a constructor
false.- Setzt außer Kraft:
isConstructorin KlasseCompletionProposal- Gibt zurück:
trueif the proposal is a constructor.
-
getReceiverSignature
public char[] getReceiverSignature()Beschreibung aus Klasse kopiert:CompletionProposalReturns the type signature or package name of the relevant receiver in the context, ornullif none.This field is available for the following kinds of completion proposals:
FIELD_REF_WITH_CASTED_RECEIVER- type signature of the type that cast the receiver of the field that is referencedMETHOD_REF_WITH_CASTED_RECEIVER- type signature of the type that cast the receiver of the method that is referenced
null. Clients must not modify the array returned.- Setzt außer Kraft:
getReceiverSignaturein KlasseCompletionProposal- Gibt zurück:
- a type signature or a package name (depending
on the kind of completion), or
nullif none - Siehe auch:
-
getReceiverStart
public int getReceiverStart()Beschreibung aus Klasse kopiert:CompletionProposalReturns the character index of the start of the subrange in the source file buffer containing the relevant receiver of the member being completed. This receiver is an expression.This field is available for the following kinds of completion proposals:
FIELD_REF_WITH_CASTED_RECEIVERMETHOD_REF_WITH_CASTED_RECEIVER
0.- Setzt außer Kraft:
getReceiverStartin KlasseCompletionProposal- Gibt zurück:
- character index of receiver start position (inclusive)
-
getReceiverEnd
public int getReceiverEnd()Beschreibung aus Klasse kopiert:CompletionProposalReturns the character index of the end (exclusive) of the subrange in the source file buffer containing the relevant receiver of the member being completed. *This field is available for the following kinds of completion proposals:
FIELD_REF_WITH_CASTED_RECEIVERMETHOD_REF_WITH_CASTED_RECEIVER
0.- Setzt außer Kraft:
getReceiverEndin KlasseCompletionProposal- Gibt zurück:
- character index of receiver end position (exclusive)
-
setReceiverSignature
public void setReceiverSignature(char[] signature) Beschreibung aus Klasse kopiert:CompletionProposalSets the type or package signature of the relevant receiver in the context, ornullif none.If not set, defaults to none.
The completion engine creates instances of this class and sets its properties; this method is not intended to be used by other clients.
- Setzt außer Kraft:
setReceiverSignaturein KlasseCompletionProposal- Parameter:
signature- the type or package signature, ornullif none
-
setReceiverRange
public void setReceiverRange(int startIndex, int endIndex) Beschreibung aus Klasse kopiert:CompletionProposalSets the character indices of the subrange in the source file buffer containing the relevant receiver of the member being completed.If not set, defaults to empty subrange at [0,0).
- Setzt außer Kraft:
setReceiverRangein KlasseCompletionProposal- Parameter:
startIndex- character index of receiver start position (inclusive)endIndex- character index of receiver end position (exclusive)
-
toString
-
canUseDiamond
Beschreibung aus Klasse kopiert:CompletionProposalReturns whether it is safe to use the 'Ungültige Eingabe: "<">' (diamond) operator in place of explicitly specifying type arguments for this proposal.This is only relevant for source level 1.7 or greater.
- Setzt außer Kraft:
canUseDiamondin KlasseCompletionProposal- Parameter:
coreContext- the completion context associated with the proposal- Gibt zurück:
trueif it is safe to use the diamond operator for the constructor invocation,falseotherwise. Also returnsfalsefor source levels below 1.7
-