public class InternalCompletionProposal extends CompletionProposal
| Modifier and Type | Field and Description |
|---|---|
protected int |
accessibility |
protected CompletionEngine |
completionEngine |
protected char[] |
declarationPackageName |
protected char[] |
declarationTypeName |
protected boolean |
isConstructor |
protected char[] |
moduleName |
protected NameLookup |
nameLookup |
protected char[] |
originalSignature |
protected char[] |
packageName |
protected char[][] |
parameterPackageNames |
protected char[][] |
parameterTypeNames |
protected char[] |
typeName |
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, 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| Constructor and Description |
|---|
InternalCompletionProposal(int kind,
int completionLocation)
Creates a basic completion proposal.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canUseDiamond(CompletionContext coreContext)
Returns whether it is safe to use the '<>' (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(IProgressMonitor monitor)
Finds the method parameter names.
|
int |
getAccessibility()
Returns the accessibility of the proposal.
|
int |
getAdditionalFlags()
Returns the completion flags relevant in the context, or
CompletionFlags.Default if none. |
Binding |
getBinding()
Returns a binding of the method or field corresponding to this proposal or
null if none. |
char[] |
getCompletion()
Returns the proposed sequence of characters to insert into the
source file buffer, replacing the characters at the specified
source range.
|
int |
getCompletionLocation()
Returns the character index in the source file buffer
where source completion was requested (the
offset parameter to
ICodeAssist.codeComplete minus one). |
char[] |
getDeclarationKey()
Returns the key of the relevant
declaration in the context, or
null if none. |
protected char[] |
getDeclarationPackageName() |
char[] |
getDeclarationSignature()
Returns the type signature or package name or module name (9) of the relevant
declaration in the context, or
null if none. |
protected char[] |
getDeclarationTypeName() |
int |
getFlags()
Returns the modifier flags relevant in the context, or
Flags.AccDefault if none. |
char[] |
getKey()
Returns the key relevant in the context,
or
null if none. |
int |
getKind()
Returns the kind of completion being proposed.
|
protected char[] |
getModuleName() |
char[] |
getName()
Returns the simple name of the method, field,
member, or variable relevant in the context, or
null if none. |
protected char[] |
getPackageName() |
protected char[][] |
getParameterPackageNames() |
protected char[][] |
getParameterTypeNames() |
int |
getReceiverEnd()
Returns the character index of the end (exclusive) of the subrange
in the source file buffer containing the
relevant receiver of the member being completed.
|
char[] |
getReceiverSignature()
Returns the type signature or package name of the relevant
receiver in the context, or
null if none. |
int |
getReceiverStart()
Returns the character index of the start of the
subrange in the source file buffer containing the
relevant receiver of the member being completed.
|
int |
getRelevance()
Returns the relative relevance rating of this proposal.
|
int |
getReplaceEnd()
Returns the character index of the end of the
subrange in the source file buffer to be replaced
by the completion string.
|
int |
getReplaceStart()
Returns the character index of the start of the
subrange in the source file buffer to be replaced
by the completion string.
|
CompletionProposal[] |
getRequiredProposals()
Returns the required completion proposals.
|
char[] |
getSignature()
Returns the signature of the method or type
relevant in the context, or
null if none. |
int |
getTokenEnd()
Returns the character index of the end (exclusive) of the subrange
in the source file buffer containing the
relevant token.
|
int |
getTokenStart()
Returns the character index of the start of the
subrange in the source file buffer containing the
relevant token being completed.
|
protected char[] |
getTypeName() |
boolean |
isConstructor()
Returns whether this proposal is a constructor.
|
protected void |
setAccessibility(int kind) |
void |
setAdditionalFlags(int additionalFlags)
Sets the completion flags relevant in the context.
|
void |
setBinding(Binding binding) |
void |
setCompletion(char[] completion)
Sets the proposed sequence of characters to insert into the
source file buffer, replacing the characters at the specified
source range.
|
void |
setDeclarationKey(char[] key)
Sets the type or package key of the relevant
declaration in the context, or
null if none. |
protected void |
setDeclarationPackageName(char[] declarationPackageName) |
void |
setDeclarationSignature(char[] signature)
Sets the type or package signature or module name (9) of the relevant
declaration in the context, or
null if none. |
protected void |
setDeclarationTypeName(char[] declarationTypeName) |
void |
setFlags(int flags)
Sets the modifier flags relevant in the context.
|
void |
setHasNoParameterNamesFromIndex(boolean hasNoParameterNamesFromIndex) |
protected void |
setIsContructor(boolean isConstructor) |
void |
setKey(char[] key)
Sets the key of the method, field type, member type,
relevant in the context, or
null if none. |
protected void |
setModuleName(char[] moduleName) |
void |
setName(char[] name)
Sets the simple name of the method (type simple name for constructor), field,
member, or variable relevant in the context, or
null if none. |
void |
setOriginalSignature(char[] originalSignature) |
protected void |
setPackageName(char[] packageName) |
void |
setParameterNames(char[][] parameterNames)
Sets the method parameter names.
|
protected void |
setParameterPackageNames(char[][] parameterPackageNames) |
protected void |
setParameterTypeNames(char[][] parameterTypeNames) |
void |
setReceiverRange(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.
|
void |
setReceiverSignature(char[] signature)
Sets the type or package signature of the relevant
receiver in the context, or
null if none. |
void |
setRelevance(int rating)
Sets the relative relevance rating of this proposal.
|
void |
setReplaceRange(int startIndex,
int endIndex)
Sets the character indices of the subrange in the
source file buffer to be replaced by the completion
string.
|
void |
setRequiredProposals(CompletionProposal[] proposals)
Sets the list of required completion proposals, or
null if none. |
void |
setSignature(char[] signature)
Sets the signature of the method, field type, member type,
relevant in the context, or
null if none. |
void |
setTokenRange(int startIndex,
int endIndex)
Sets the character indices of the subrange in the
source file buffer containing the relevant token being
completed.
|
protected void |
setTypeName(char[] typeName) |
java.lang.String |
toString() |
createprotected CompletionEngine completionEngine
protected NameLookup nameLookup
protected char[] declarationPackageName
protected char[] declarationTypeName
protected char[] moduleName
protected char[] packageName
protected char[] typeName
protected char[][] parameterPackageNames
protected char[][] parameterTypeNames
protected char[] originalSignature
protected int accessibility
protected boolean isConstructor
public InternalCompletionProposal(int kind,
int completionLocation)
Note that the constructors for this class are internal to the Java model implementation. Clients cannot directly create CompletionProposal objects.
kind - one of the kind constants declared on this classcompletionLocation - original offset of code completion requestprotected char[][] findConstructorParameterNames(char[] declaringTypePackageName,
char[] declaringTypeName,
char[] selector,
char[][] paramTypeNames)
protected char[][] findMethodParameterNames(char[] declaringTypePackageName,
char[] declaringTypeName,
char[] selector,
char[][] paramTypeNames)
protected char[] getDeclarationPackageName()
protected char[] getDeclarationTypeName()
protected char[] getModuleName()
protected char[] getPackageName()
protected char[] getTypeName()
protected char[][] getParameterPackageNames()
protected char[][] getParameterTypeNames()
protected void setDeclarationPackageName(char[] declarationPackageName)
protected void setDeclarationTypeName(char[] declarationTypeName)
protected void setModuleName(char[] moduleName)
protected void setPackageName(char[] packageName)
protected void setTypeName(char[] typeName)
protected void setParameterPackageNames(char[][] parameterPackageNames)
protected void setParameterTypeNames(char[][] parameterTypeNames)
protected void setAccessibility(int kind)
protected void setIsContructor(boolean isConstructor)
public void setOriginalSignature(char[] originalSignature)
public int getAdditionalFlags()
CompletionProposalCompletionFlags.Default if 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 include CompletionFlags.StaticImportMETHOD_IMPORT - completion flags
of the attribute that is referenced. Completion flags for
this proposal kind can only include CompletionFlags.StaticImportTYPE_IMPORT - completion flags
of the attribute that is referenced. Completion flags for
this proposal kind can only include CompletionFlags.StaticImportCompletionFlags.Default.getAdditionalFlags in class CompletionProposalCompletionFlags.Default if noneCompletionFlagspublic void setAdditionalFlags(int additionalFlags)
CompletionProposalIf 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.
setAdditionalFlags in class CompletionProposaladditionalFlags - the completion flags, or
CompletionFlags.Default if nonepublic int getKind()
CompletionProposalThe 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.
getKind in class CompletionProposalpublic int getCompletionLocation()
CompletionProposaloffset parameter to
ICodeAssist.codeComplete minus one).getCompletionLocation in class CompletionProposalICodeAssist.codeComplete(int,CompletionRequestor)public int getTokenStart()
CompletionProposalgetTokenStart in class CompletionProposalpublic int getTokenEnd()
CompletionProposalgetEndToken() == getStartToken()).getTokenEnd in class CompletionProposalpublic void setTokenRange(int startIndex,
int endIndex)
CompletionProposalIf not set, defaults to empty subrange at [0,0).
setTokenRange in class CompletionProposalstartIndex - character index of token start position (inclusive)endIndex - character index of token end position (exclusive)public char[] getCompletion()
CompletionProposalThe client must not modify the array returned.
getCompletion in class CompletionProposalpublic void setCompletion(char[] completion)
CompletionProposalIf 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.
setCompletion in class CompletionProposalcompletion - the completion stringpublic int getReplaceStart()
CompletionProposalgetReplaceEnd() == 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.
getReplaceStart in class CompletionProposalpublic int getReplaceEnd()
CompletionProposalgetReplaceEnd() == getReplaceStart()),
the completion string is to be inserted at this
index.getReplaceEnd in class CompletionProposalpublic void setReplaceRange(int startIndex,
int endIndex)
CompletionProposalstartIndex == 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.
setReplaceRange in class CompletionProposalstartIndex - character index of replacement start position (inclusive)endIndex - character index of replacement end position (exclusive)public int getRelevance()
CompletionProposalgetRelevance in class CompletionProposalpublic void setRelevance(int rating)
CompletionProposalIf 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.
setRelevance in class CompletionProposalrating - relevance rating of this proposal; ratings are positive; higher means betterpublic char[] getDeclarationSignature()
CompletionProposalnull if 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 creatednull. Clients must not modify the array
returned.getDeclarationSignature in class CompletionProposalnull if noneSignaturepublic char[] getDeclarationKey()
CompletionProposalnull if 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 overriddennull. Clients must not modify the array
returned.getDeclarationKey in class CompletionProposalnull if noneASTParser.createASTs(ICompilationUnit[], String[], org.aspectj.org.eclipse.jdt.core.dom.ASTRequestor, IProgressMonitor)public void setDeclarationSignature(char[] signature)
CompletionProposalnull if 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.
setDeclarationSignature in class CompletionProposalsignature - the type or package signature or module name(9) , or
null if nonepublic void setDeclarationKey(char[] key)
CompletionProposalnull if 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.
setDeclarationKey in class CompletionProposalkey - the type or package key, or
null if nonepublic char[] getName()
CompletionProposalnull if 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 methodnull. Clients must not modify the array
returned.getName in class CompletionProposalnull if nonepublic void setName(char[] name)
CompletionProposalnull if 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.
setName in class CompletionProposalname - the keyword, field, method, local variable,
or member name, or null if nonepublic Binding getBinding()
null if none.
The binding may be available for the following kinds of completion proposals:
ANONYMOUS_CLASS_CONSTRUCTOR_INVOCATION - MethodBinding
of the constructor being proposedCONSTRUCTOR_INVOCATION - MethodBinding
of the constructor being proposedFIELD_REF - FieldBinding
of the field being proposedFIELD_REF_WITH_CASTED_RECEIVER - FieldBinding
of the field being proposedJAVADOC_FIELD_REF - FieldBinding
of the field being proposedJAVADOC_METHOD_REF - MethodBinding
of the method or constructor being proposedMETHOD_DECLARATION - MethodBinding
of the method or constructor being proposedMETHOD_NAME_REFERENCE - MethodBinding
of the method or constructor being proposedMETHOD_REF - MethodBinding
of the method or constructor being proposedMETHOD_REF_WITH_CASTED_RECEIVER - MethodBinding
of the method or constructor being proposednull.
null if nonepublic void setBinding(Binding binding)
public char[] getSignature()
CompletionProposalnull if 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 creatednull. Clients must not modify the array
returned.getSignature in class CompletionProposalnull if noneSignaturepublic char[] getKey()
CompletionProposalnull if none.
This field is available for the following kinds of completion proposals:
ANONYMOUS_CLASS_DECLARATION - method key
of the constructor that is being invoked, or null if
the declaring type is an interfaceMETHOD_DECLARATION - method key
of the method that is being implemented or overriddennull. Clients must not modify the array
returned.getKey in class CompletionProposalnull if noneASTParser.createASTs(ICompilationUnit[], String[], org.aspectj.org.eclipse.jdt.core.dom.ASTRequestor, IProgressMonitor)public void setSignature(char[] signature)
CompletionProposalnull if 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.
setSignature in class CompletionProposalsignature - the signature, or null if nonepublic void setKey(char[] key)
CompletionProposalnull if 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.
setKey in class CompletionProposalkey - the key, or null if nonepublic int getFlags()
CompletionProposalFlags.AccDefault if 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.AccEnum can be used to recognize
references to enum constants
FIELD_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.AccAnnotation can be used to recognize
references to annotation type members
METHOD_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.AccInterface
can be used to recognize references to interfaces,
Flags.AccEnum enum types,
and Flags.AccAnnotation annotation typesTYPE_REF - modifier flags
of the type that is referenced; Flags.AccInterface
can be used to recognize references to interfaces,
Flags.AccEnum enum types,
and Flags.AccAnnotation annotation types
VARIABLE_DECLARATION - modifier flags
for the variable being declaredPOTENTIAL_METHOD_DECLARATION - modifier flags
for the method that is being createdFlags.AccDefault.getFlags in class CompletionProposalFlags.AccDefault if noneFlagspublic void setFlags(int flags)
CompletionProposalIf 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.
setFlags in class CompletionProposalflags - the modifier flags, or
Flags.AccDefault if nonepublic void setHasNoParameterNamesFromIndex(boolean hasNoParameterNamesFromIndex)
public CompletionProposal[] getRequiredProposals()
CompletionProposalThis field is available for the following kinds of completion proposals:
FIELD_REF - The allowed required proposals for this kind are:
TYPE_REFTYPE_IMPORTFIELD_IMPORTMETHOD_REF - The allowed required proposals for this kind are:
TYPE_REFTYPE_IMPORTMETHOD_IMPORTTYPE_REF - The allowed required proposals for this kind are:
TYPE_REFCONSTRUCTOR_INVOCATION - The allowed required proposals for this kind are:
TYPE_REFANONYMOUS_CLASS_CONSTRUCTOR_INVOCATION - The allowed required proposals for this kind are:
TYPE_REFANONYMOUS_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)
return true for that kind.
A required completion proposal cannot have required completion proposals.
getRequiredProposals in class CompletionProposalnull if none.CompletionRequestor.setAllowsRequiredProposals(int, int,boolean)public void setRequiredProposals(CompletionProposal[] proposals)
CompletionProposalnull if 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.
setRequiredProposals in class CompletionProposalproposals - the list of required completion proposals, or
null if nonepublic char[][] findParameterNames(IProgressMonitor monitor)
CompletionProposalnull
if 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.
findParameterNames in class CompletionProposalmonitor - the progress monitor, or null if nonenull if none
or not available or not relevantpublic void setParameterNames(char[][] parameterNames)
CompletionProposalThe completion engine creates instances of this class and sets its properties; this method is not intended to be used by other clients.
setParameterNames in class CompletionProposalparameterNames - the parameter names, or null if nonepublic int getAccessibility()
CompletionProposalThis field is available for the following kinds of completion proposals:
TYPE_REF - accessibility of the typeIAccessRule.K_ACCESSIBLE or IAccessRule.K_DISCOURAGED
or IAccessRule.K_NON_ACCESSIBLE.
By default this method return IAccessRule.K_ACCESSIBLE.getAccessibility in class CompletionProposalIAccessRulepublic boolean isConstructor()
CompletionProposalThis field is available for the following kinds of completion proposals:
METHOD_REF - return true
if the referenced method is a constructorMETHOD_DECLARATION - return true
if the declared method is a constructorfalse.isConstructor in class CompletionProposaltrue if the proposal is a constructor.public char[] getReceiverSignature()
CompletionProposalnull if 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 referencednull. Clients must not modify the array
returned.getReceiverSignature in class CompletionProposalnull if noneSignaturepublic int getReceiverStart()
CompletionProposalThis field is available for the following kinds of completion proposals:
FIELD_REF_WITH_CASTED_RECEIVERMETHOD_REF_WITH_CASTED_RECEIVER0.getReceiverStart in class CompletionProposalpublic int getReceiverEnd()
CompletionProposalThis field is available for the following kinds of completion proposals:
FIELD_REF_WITH_CASTED_RECEIVERMETHOD_REF_WITH_CASTED_RECEIVER0.getReceiverEnd in class CompletionProposalpublic void setReceiverSignature(char[] signature)
CompletionProposalnull if 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.
setReceiverSignature in class CompletionProposalsignature - the type or package signature, or
null if nonepublic void setReceiverRange(int startIndex,
int endIndex)
CompletionProposalIf not set, defaults to empty subrange at [0,0).
setReceiverRange in class CompletionProposalstartIndex - character index of receiver start position (inclusive)endIndex - character index of receiver end position (exclusive)public java.lang.String toString()
toString in class java.lang.Objectpublic boolean canUseDiamond(CompletionContext coreContext)
CompletionProposalThis is only relevant for source level 1.7 or greater.
canUseDiamond in class CompletionProposalcoreContext - the completion context associated with the proposaltrue if it is safe to use the diamond operator for the constructor invocation,
false otherwise. Also returns false for source levels below 1.7