org.aspectj.org.eclipse.jdt.internal.codeassist
Class InternalCompletionProposal

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.core.CompletionProposal
      extended by org.aspectj.org.eclipse.jdt.internal.codeassist.InternalCompletionProposal

public class InternalCompletionProposal
extends CompletionProposal

Internal completion proposal

Since:
3.1

Field Summary
protected  int accessibility
           
protected  CompletionEngine completionEngine
           
protected  char[] declarationPackageName
           
protected  char[] declarationTypeName
           
protected  boolean isConstructor
           
protected  NameLookup nameLookup
           
protected  char[] originalSignature
           
protected  char[] packageName
           
protected  char[][] parameterPackageNames
           
protected  char[][] parameterTypeNames
           
protected  char[] typeName
           
 
Fields inherited from class 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, LAST_KIND, LOCAL_VARIABLE_REF, METHOD_DECLARATION, METHOD_IMPORT, METHOD_NAME_REFERENCE, METHOD_REF, METHOD_REF_WITH_CASTED_RECEIVER, PACKAGE_REF, POTENTIAL_METHOD_DECLARATION, TYPE_IMPORT, TYPE_REF, VARIABLE_DECLARATION
 
Constructor Summary
InternalCompletionProposal(int kind, int completionLocation)
          Creates a basic completion proposal.
 
Method Summary
 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.
 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 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.
 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 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 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.
 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()
           
 
Methods inherited from class org.aspectj.org.eclipse.jdt.core.CompletionProposal
create
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

completionEngine

protected CompletionEngine completionEngine

nameLookup

protected NameLookup nameLookup

declarationPackageName

protected char[] declarationPackageName

declarationTypeName

protected char[] declarationTypeName

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
Constructor Detail

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.

Parameters:
kind - one of the kind constants declared on this class
completionLocation - original offset of code completion request
Method Detail

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

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)

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()
Returns the completion flags relevant in the context, or CompletionFlags.Default if none.

This field is available for the following kinds of completion proposals:

For other kinds of completion proposals, this method returns CompletionFlags.Default.

Overrides:
getAdditionalFlags in class CompletionProposal
Returns:
the completion flags, or CompletionFlags.Default if none
Since:
3.3
See Also:
CompletionFlags

setAdditionalFlags

public void setAdditionalFlags(int additionalFlags)
Sets 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.

Overrides:
setAdditionalFlags in class CompletionProposal
Parameters:
additionalFlags - the completion flags, or CompletionFlags.Default if none
Since:
3.3

getKind

public int getKind()
Returns 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.

Overrides:
getKind in class CompletionProposal
Returns:
the kind; one of the kind constants declared on this class, or possibly a kind unknown to the caller

getCompletionLocation

public int getCompletionLocation()
Returns the character index in the source file buffer where source completion was requested (the offset parameter to ICodeAssist.codeComplete minus one).

Overrides:
getCompletionLocation in class CompletionProposal
Returns:
character index in source file buffer
See Also:
ICodeAssist.codeComplete(int,CompletionRequestor)

getTokenStart

public int getTokenStart()
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.

Overrides:
getTokenStart in class CompletionProposal
Returns:
character index of token start position (inclusive)

getTokenEnd

public int getTokenEnd()
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 (getEndToken() == getStartToken()).

Overrides:
getTokenEnd in class CompletionProposal
Returns:
character index of token end position (exclusive)

setTokenRange

public void setTokenRange(int startIndex,
                          int endIndex)
Sets 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).

Overrides:
setTokenRange in class CompletionProposal
Parameters:
startIndex - character index of token start position (inclusive)
endIndex - character index of token end position (exclusive)

getCompletion

public char[] getCompletion()
Returns 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.

Overrides:
getCompletion in class CompletionProposal
Returns:
the completion string

setCompletion

public 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. 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.

Overrides:
setCompletion in class CompletionProposal
Parameters:
completion - the completion string

getReplaceStart

public int getReplaceStart()
Returns 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.

Overrides:
getReplaceStart in class CompletionProposal
Returns:
replacement start position (inclusive)

getReplaceEnd

public int getReplaceEnd()
Returns 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.

Overrides:
getReplaceEnd in class CompletionProposal
Returns:
replacement end position (exclusive)

setReplaceRange

public 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. 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.

Overrides:
setReplaceRange in class CompletionProposal
Parameters:
startIndex - character index of replacement start position (inclusive)
endIndex - character index of replacement end position (exclusive)

getRelevance

public int getRelevance()
Returns the relative relevance rating of this proposal.

Overrides:
getRelevance in class CompletionProposal
Returns:
relevance rating of this proposal; ratings are positive; higher means better

setRelevance

public void setRelevance(int rating)
Sets 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.

Overrides:
setRelevance in class CompletionProposal
Parameters:
rating - relevance rating of this proposal; ratings are positive; higher means better

getDeclarationSignature

public char[] getDeclarationSignature()
Returns the type signature or package name of the relevant declaration in the context, or null if none.

This field is available for the following kinds of completion proposals:

For kinds of completion proposals, this method returns null. Clients must not modify the array returned.

Overrides:
getDeclarationSignature in class CompletionProposal
Returns:
a type signature or a package name (depending on the kind of completion), or null if none
See Also:
Signature

getDeclarationKey

public char[] getDeclarationKey()
Returns the key of the relevant declaration in the context, or null if none.

This field is available for the following kinds of completion proposals:

For kinds of completion proposals, this method returns null. Clients must not modify the array returned.

Overrides:
getDeclarationKey in class CompletionProposal
Returns:
a key, or null if none
Since:
3.1
See Also:
ASTParser.createASTs(ICompilationUnit[], String[], org.aspectj.org.eclipse.jdt.core.dom.ASTRequestor, IProgressMonitor)

setDeclarationSignature

public void setDeclarationSignature(char[] signature)
Sets the type or package signature of the relevant declaration in the context, or null 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.

Overrides:
setDeclarationSignature in class CompletionProposal
Parameters:
signature - the type or package signature, or null if none

setDeclarationKey

public void setDeclarationKey(char[] key)
Sets the type or package key of the relevant declaration in the context, or null 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.

Overrides:
setDeclarationKey in class CompletionProposal
Parameters:
key - the type or package key, or null if none
Since:
3.1

getName

public char[] getName()
Returns the simple name of the method, field, member, or variable relevant in the context, or null if none.

This field is available for the following kinds of completion proposals:

For kinds of completion proposals, this method returns null. Clients must not modify the array returned.

Overrides:
getName in class CompletionProposal
Returns:
the keyword, field, method, local variable, or member name, or null if none

setName

public 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.

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.

Overrides:
setName in class CompletionProposal
Parameters:
name - the keyword, field, method, local variable, or member name, or null if none

getSignature

public char[] getSignature()
Returns the signature of the method or type relevant in the context, or null if none.

This field is available for the following kinds of completion proposals:

For kinds of completion proposals, this method returns null. Clients must not modify the array returned.

Overrides:
getSignature in class CompletionProposal
Returns:
the signature, or null if none
See Also:
Signature

getKey

public char[] getKey()
Returns the key relevant in the context, or null if none.

This field is available for the following kinds of completion proposals:

For kinds of completion proposals, this method returns null. Clients must not modify the array returned.

Overrides:
getKey in class CompletionProposal
Returns:
the key, or null if none
Since:
3.1
See Also:
ASTParser.createASTs(ICompilationUnit[], String[], org.aspectj.org.eclipse.jdt.core.dom.ASTRequestor, IProgressMonitor)

setSignature

public void setSignature(char[] signature)
Sets the signature of the method, field type, member type, relevant in the context, or null 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.

Overrides:
setSignature in class CompletionProposal
Parameters:
signature - the signature, or null if none

setKey

public void setKey(char[] key)
Sets the key of the method, field type, member type, relevant in the context, or null 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.

Overrides:
setKey in class CompletionProposal
Parameters:
key - the key, or null if none
Since:
3.1

getFlags

public int getFlags()
Returns the modifier flags relevant in the context, or Flags.AccDefault if none.

This field is available for the following kinds of completion proposals:

For other kinds of completion proposals, this method returns Flags.AccDefault.

Overrides:
getFlags in class CompletionProposal
Returns:
the modifier flags, or Flags.AccDefault if none
See Also:
Flags

setFlags

public void setFlags(int flags)
Sets 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.

Overrides:
setFlags in class CompletionProposal
Parameters:
flags - the modifier flags, or Flags.AccDefault if none

setHasNoParameterNamesFromIndex

public void setHasNoParameterNamesFromIndex(boolean hasNoParameterNamesFromIndex)

getRequiredProposals

public CompletionProposal[] getRequiredProposals()
Returns 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:

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.

Overrides:
getRequiredProposals in class CompletionProposal
Returns:
the required completion proposals, or null if none.
Since:
3.3
See Also:
CompletionRequestor.setAllowsRequiredProposals(int, int,boolean)

setRequiredProposals

public void setRequiredProposals(CompletionProposal[] proposals)
Sets the list of required completion proposals, or null 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.

Overrides:
setRequiredProposals in class CompletionProposal
Parameters:
proposals - the list of required completion proposals, or null if none
Since:
3.3

findParameterNames

public char[][] findParameterNames(IProgressMonitor monitor)
Finds the method parameter names. This information is relevant to method reference (and method declaration proposals). Returns null 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.

Overrides:
findParameterNames in class CompletionProposal
Parameters:
monitor - the progress monitor, or null if none
Returns:
the parameter names, or null if none or not available or not relevant

setParameterNames

public void setParameterNames(char[][] parameterNames)
Sets 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.

Overrides:
setParameterNames in class CompletionProposal
Parameters:
parameterNames - the parameter names, or null if none

getAccessibility

public int getAccessibility()
Returns the accessibility of the proposal.

This field is available for the following kinds of completion proposals:

For these kinds of completion proposals, this method returns IAccessRule.K_ACCESSIBLE or IAccessRule.K_DISCOURAGED or IAccessRule.K_NON_ACCESSIBLE. By default this method return IAccessRule.K_ACCESSIBLE.

Overrides:
getAccessibility in class CompletionProposal
Returns:
the accessibility of the proposal
Since:
3.1
See Also:
IAccessRule

isConstructor

public boolean isConstructor()
Returns whether this proposal is a constructor.

This field is available for the following kinds of completion proposals:

For kinds of completion proposals, this method returns false.

Overrides:
isConstructor in class CompletionProposal
Returns:
true if the proposal is a constructor.
Since:
3.1

getReceiverSignature

public char[] getReceiverSignature()
Returns the type signature or package name of the relevant receiver in the context, or null if none.

This field is available for the following kinds of completion proposals:

For kinds of completion proposals, this method returns null. Clients must not modify the array returned.

Overrides:
getReceiverSignature in class CompletionProposal
Returns:
a type signature or a package name (depending on the kind of completion), or null if none
Since:
3.4
See Also:
Signature

getReceiverStart

public 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. This receiver is an expression.

This field is available for the following kinds of completion proposals:

For kinds of completion proposals, this method returns 0.

Overrides:
getReceiverStart in class CompletionProposal
Returns:
character index of receiver start position (inclusive)
Since:
3.4

getReceiverEnd

public 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. *

This field is available for the following kinds of completion proposals:

For kinds of completion proposals, this method returns 0.

Overrides:
getReceiverEnd in class CompletionProposal
Returns:
character index of receiver end position (exclusive)
Since:
3.4

setReceiverSignature

public void setReceiverSignature(char[] signature)
Sets the type or package signature of the relevant receiver in the context, or null 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.

Overrides:
setReceiverSignature in class CompletionProposal
Parameters:
signature - the type or package signature, or null if none
Since:
3.4

setReceiverRange

public 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.

If not set, defaults to empty subrange at [0,0).

Overrides:
setReceiverRange in class CompletionProposal
Parameters:
startIndex - character index of receiver start position (inclusive)
endIndex - character index of receiver end position (exclusive)
Since:
3.4

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

canUseDiamond

public boolean canUseDiamond(CompletionContext coreContext)
Description copied from class: CompletionProposal
Returns whether it is safe to use the '<>' (diamond) operator in place of explicitly specifying type arguments for this proposal.

This is only relevant for source level 1.7 or greater.

Overrides:
canUseDiamond in class CompletionProposal
Parameters:
coreContext - the completion context associated with the proposal
Returns:
true if it is safe to use the diamond operator for the constructor invocation, false otherwise. Also returns false for source levels below 1.7