Klasse InternalCompletionProposal

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

public class InternalCompletionProposal extends CompletionProposal
Internal completion proposal
Seit:
3.1
  • Felddetails

    • completionEngine

      protected CompletionEngine completionEngine
    • nameLookup

      protected NameLookup 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 class
      completionLocation - 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: CompletionProposal
      Returns the completion flags relevant in the context, or CompletionFlags.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.StaticImport
      • METHOD_IMPORT - completion flags of the attribute that is referenced. Completion flags for this proposal kind can only include CompletionFlags.StaticImport
      • TYPE_IMPORT - completion flags of the attribute that is referenced. Completion flags for this proposal kind can only include CompletionFlags.StaticImport
      For other kinds of completion proposals, this method returns CompletionFlags.Default.
      Setzt außer Kraft:
      getAdditionalFlags in Klasse CompletionProposal
      Gibt zurück:
      the completion flags, or CompletionFlags.Default if none
      Siehe auch:
    • setAdditionalFlags

      public void setAdditionalFlags(int additionalFlags)
      Beschreibung aus Klasse kopiert: CompletionProposal
      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.

      Setzt außer Kraft:
      setAdditionalFlags in Klasse CompletionProposal
      Parameter:
      additionalFlags - the completion flags, or CompletionFlags.Default if none
    • getKind

      public int getKind()
      Beschreibung aus Klasse kopiert: CompletionProposal
      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.

      Setzt außer Kraft:
      getKind in Klasse CompletionProposal
      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: CompletionProposal
      Returns the character index in the source file buffer where source completion was requested (the offset parameter to ICodeAssist.codeComplete minus one).
      Setzt außer Kraft:
      getCompletionLocation in Klasse CompletionProposal
      Gibt zurück:
      character index in source file buffer
      Siehe auch:
    • getTokenStart

      public int getTokenStart()
      Beschreibung aus Klasse kopiert: CompletionProposal
      Returns the character index of the start of the subrange in the source file buffer containing the relevant token being completed. This token is either the identifier or Java language keyword under, or immediately preceding, the original request offset. If the original request offset is not within or immediately after an identifier or keyword, then the position returned is original request offset and the token range is empty.
      Setzt außer Kraft:
      getTokenStart in Klasse CompletionProposal
      Gibt zurück:
      character index of token start position (inclusive)
    • getTokenEnd

      public int getTokenEnd()
      Beschreibung aus Klasse kopiert: CompletionProposal
      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()).
      Setzt außer Kraft:
      getTokenEnd in Klasse CompletionProposal
      Gibt zurück:
      character index of token end position (exclusive)
    • setTokenRange

      public void setTokenRange(int startIndex, int endIndex)
      Beschreibung aus Klasse kopiert: CompletionProposal
      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).

      Setzt außer Kraft:
      setTokenRange in Klasse CompletionProposal
      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: CompletionProposal
      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.

      Setzt außer Kraft:
      getCompletion in Klasse CompletionProposal
      Gibt zurück:
      the completion string
    • setCompletion

      public void setCompletion(char[] completion)
      Beschreibung aus Klasse kopiert: CompletionProposal
      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.

      Setzt außer Kraft:
      setCompletion in Klasse CompletionProposal
      Parameter:
      completion - the completion string
    • getReplaceStart

      public int getReplaceStart()
      Beschreibung aus Klasse kopiert: CompletionProposal
      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.

      Setzt außer Kraft:
      getReplaceStart in Klasse CompletionProposal
      Gibt zurück:
      replacement start position (inclusive)
    • getReplaceEnd

      public int getReplaceEnd()
      Beschreibung aus Klasse kopiert: CompletionProposal
      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.
      Setzt außer Kraft:
      getReplaceEnd in Klasse CompletionProposal
      Gibt zurück:
      replacement end position (exclusive)
    • setReplaceRange

      public void setReplaceRange(int startIndex, int endIndex)
      Beschreibung aus Klasse kopiert: CompletionProposal
      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.

      Setzt außer Kraft:
      setReplaceRange in Klasse CompletionProposal
      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: CompletionProposal
      Returns the relative relevance rating of this proposal.
      Setzt außer Kraft:
      getRelevance in Klasse CompletionProposal
      Gibt zurück:
      relevance rating of this proposal; ratings are positive; higher means better
    • setRelevance

      public void setRelevance(int rating)
      Beschreibung aus Klasse kopiert: CompletionProposal
      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.

      Setzt außer Kraft:
      setRelevance in Klasse CompletionProposal
      Parameter:
      rating - relevance rating of this proposal; ratings are positive; higher means better
    • getDeclarationSignature

      public char[] getDeclarationSignature()
      Beschreibung aus Klasse kopiert: CompletionProposal
      Returns the type signature or package name or module name (9) of the relevant declaration in the context, or null 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 referenced
      • ANONYMOUS_CLASS_DECLARATION - type signature of the type that is being subclassed or implemented
      • FIELD_IMPORT - type signature of the type that declares the field that is imported
      • FIELD_REF - type signature of the type that declares the field that is referenced
      • FIELD_REF_WITH_CASTED_RECEIVER - type signature of the type that declares the field that is referenced
      • METHOD_IMPORT - type signature of the type that declares the method that is imported
      • METHOD_REF - type signature of the type that declares the method that is referenced
      • METHOD_REF_WITH_CASTED_RECEIVER - type signature of the type that declares the method that is referenced
      • METHOD_DECLARATION - type signature of the type that declares the method that is being implemented or overridden
      • MODULE_DECLARATION - possible name of the module that is being declared
      • MODULE_REF - name of the module that is referenced
      • PACKAGE_REF - dot-based package name of the package that is referenced
      • TYPE_IMPORT - dot-based package name of the package containing the type that is imported
      • TYPE_REF - dot-based package name of the package containing the type that is referenced
      • POTENTIAL_METHOD_DECLARATION - type signature of the type that declares the method that is being created
      For kinds of completion proposals, this method returns null. Clients must not modify the array returned.
      Setzt außer Kraft:
      getDeclarationSignature in Klasse CompletionProposal
      Gibt zurück:
      a type signature or a package name or module name (9) (depending on the kind of completion), or null if none
      Siehe auch:
    • getDeclarationKey

      public char[] getDeclarationKey()
      Beschreibung aus Klasse kopiert: CompletionProposal
      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:

      • ANONYMOUS_CLASS_DECLARATION - key of the type that is being subclassed or implemented
      • METHOD_DECLARATION - key of the type that declares the method that is being implemented or overridden
      For kinds of completion proposals, this method returns null. Clients must not modify the array returned.
      Setzt außer Kraft:
      getDeclarationKey in Klasse CompletionProposal
      Gibt zurück:
      a key, or null if none
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.core.dom.ASTParser#createASTs(ICompilationUnit[], String[], org.aspectj.org.eclipse.jdt.core.dom.ASTRequestor, IProgressMonitor)
    • setDeclarationSignature

      public void setDeclarationSignature(char[] signature)
      Beschreibung aus Klasse kopiert: CompletionProposal
      Sets the type or package signature or module name (9) 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.

      Setzt außer Kraft:
      setDeclarationSignature in Klasse CompletionProposal
      Parameter:
      signature - the type or package signature or module name(9) , or null if none
    • setDeclarationKey

      public void setDeclarationKey(char[] key)
      Beschreibung aus Klasse kopiert: CompletionProposal
      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.

      Setzt außer Kraft:
      setDeclarationKey in Klasse CompletionProposal
      Parameter:
      key - the type or package key, or null if none
    • getName

      public char[] getName()
      Beschreibung aus Klasse kopiert: CompletionProposal
      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:

      • ANNOTATION_ATTRIBUT_REF - the name of the attribute
      • FIELD_IMPORT - the name of the field
      • FIELD_REF - the name of the field
      • FIELD_REF_WITH_CASTED_RECEIVER - the name of the field
      • KEYWORD - the keyword
      • LABEL_REF - the name of the label
      • LOCAL_VARIABLE_REF - the name of the local variable
      • METHOD_IMPORT - the name of the method
      • METHOD_REF - the name of the method (the type simple name for constructor)
      • METHOD_REF_WITH_CASTED_RECEIVER - the name of the method
      • METHOD_DECLARATION - the name of the method (the type simple name for constructor)
      • VARIABLE_DECLARATION - the name of the variable
      • POTENTIAL_METHOD_DECLARATION - the name of the method
      For kinds of completion proposals, this method returns null. Clients must not modify the array returned.
      Setzt außer Kraft:
      getName in Klasse CompletionProposal
      Gibt zurück:
      the keyword, field, method, local variable, or member name, or null if none
    • setName

      public void setName(char[] name)
      Beschreibung aus Klasse kopiert: CompletionProposal
      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.

      Setzt außer Kraft:
      setName in Klasse CompletionProposal
      Parameter:
      name - the keyword, field, method, local variable, or member name, or null if none
    • getBinding

      public Binding getBinding()
      Returns a binding of the method or field corresponding to this proposal or null if none.

      The binding may be available for the following kinds of completion proposals:

      • ANONYMOUS_CLASS_CONSTRUCTOR_INVOCATION - MethodBinding of the constructor being proposed
      • CONSTRUCTOR_INVOCATION - MethodBinding of the constructor being proposed
      • FIELD_REF - FieldBinding of the field being proposed
      • FIELD_REF_WITH_CASTED_RECEIVER - FieldBinding of the field being proposed
      • JAVADOC_FIELD_REF - FieldBinding of the field being proposed
      • JAVADOC_METHOD_REF - MethodBinding of the method or constructor being proposed
      • METHOD_DECLARATION - MethodBinding of the method or constructor being proposed
      • METHOD_NAME_REFERENCE - MethodBinding of the method or constructor being proposed
      • METHOD_REF - MethodBinding of the method or constructor being proposed
      • METHOD_REF_WITH_CASTED_RECEIVER - MethodBinding of the method or constructor being proposed
      For other kinds of completion proposals, this method returns null.

      Gibt zurück:
      the binding corresponding to this proposal (if available), or null if none
    • setBinding

      public void setBinding(Binding binding)
    • getSignature

      public char[] getSignature()
      Beschreibung aus Klasse kopiert: CompletionProposal
      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:

      • ANNOTATION_ATTRIBUT_REF - the type signature of the referenced attribute's type
      • ANONYMOUS_CLASS_DECLARATION - method signature of the constructor that is being invoked
      • FIELD_IMPORT - the type signature of the referenced field's type
      • FIELD_REF - the type signature of the referenced field's type
      • FIELD_REF_WITH_CASTED_RECEIVER - the type signature of the referenced field's type
      • LOCAL_VARIABLE_REF - the type signature of the referenced local variable's type
      • METHOD_IMPORT - method signature of the method that is imported
      • METHOD_REF - method signature of the method that is referenced
      • METHOD_REF_WITH_CASTED_RECEIVER - method signature of the method that is referenced
      • METHOD_DECLARATION - method signature of the method that is being implemented or overridden
      • TYPE_IMPORT - type signature of the type that is imported
      • TYPE_REF - type signature of the type that is referenced
      • VARIABLE_DECLARATION - the type signature of the type of the variable being declared
      • POTENTIAL_METHOD_DECLARATION - method signature of the method that is being created
      For kinds of completion proposals, this method returns null. Clients must not modify the array returned.
      Setzt außer Kraft:
      getSignature in Klasse CompletionProposal
      Gibt zurück:
      the signature, or null if none
      Siehe auch:
    • getKey

      public char[] getKey()
      Beschreibung aus Klasse kopiert: CompletionProposal
      Returns the key relevant in the context, or null 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 interface
      • METHOD_DECLARATION - method key of the method that is being implemented or overridden
      For kinds of completion proposals, this method returns null. Clients must not modify the array returned.
      Setzt außer Kraft:
      getKey in Klasse CompletionProposal
      Gibt zurück:
      the key, or null if none
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.core.dom.ASTParser#createASTs(ICompilationUnit[], String[], org.aspectj.org.eclipse.jdt.core.dom.ASTRequestor, IProgressMonitor)
    • setSignature

      public void setSignature(char[] signature)
      Beschreibung aus Klasse kopiert: CompletionProposal
      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.

      Setzt außer Kraft:
      setSignature in Klasse CompletionProposal
      Parameter:
      signature - the signature, or null if none
    • setKey

      public void setKey(char[] key)
      Beschreibung aus Klasse kopiert: CompletionProposal
      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.

      Setzt außer Kraft:
      setKey in Klasse CompletionProposal
      Parameter:
      key - the key, or null if none
    • getFlags

      public int getFlags()
      Beschreibung aus Klasse kopiert: CompletionProposal
      Returns the modifier flags relevant in the context, or Flags.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 referenced
      • FIELD_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 keyword
      • LOCAL_VARIABLE_REF - modifier flags of the local variable that is referenced
      • METHOD_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 overridden
      • TYPE_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 types
      • TYPE_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 declared
      • POTENTIAL_METHOD_DECLARATION - modifier flags for the method that is being created
      For other kinds of completion proposals, this method returns Flags.AccDefault.
      Setzt außer Kraft:
      getFlags in Klasse CompletionProposal
      Gibt zurück:
      the modifier flags, or Flags.AccDefault if none
      Siehe auch:
    • setFlags

      public void setFlags(int flags)
      Beschreibung aus Klasse kopiert: CompletionProposal
      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.

      Setzt außer Kraft:
      setFlags in Klasse CompletionProposal
      Parameter:
      flags - the modifier flags, or Flags.AccDefault if none
    • setHasNoParameterNamesFromIndex

      public void setHasNoParameterNamesFromIndex(boolean hasNoParameterNamesFromIndex)
    • getRequiredProposals

      public CompletionProposal[] getRequiredProposals()
      Beschreibung aus Klasse kopiert: CompletionProposal
      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:

      • FIELD_REF - The allowed required proposals for this kind are:
        • TYPE_REF
        • TYPE_IMPORT
        • FIELD_IMPORT
      • METHOD_REF - The allowed required proposals for this kind are:
        • TYPE_REF
        • TYPE_IMPORT
        • METHOD_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) return true for that kind.

      A required completion proposal cannot have required completion proposals.

      Setzt außer Kraft:
      getRequiredProposals in Klasse CompletionProposal
      Gibt zurück:
      the required completion proposals, or null if none.
      Siehe auch:
    • setRequiredProposals

      public void setRequiredProposals(CompletionProposal[] proposals)
      Beschreibung aus Klasse kopiert: CompletionProposal
      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.

      Setzt außer Kraft:
      setRequiredProposals in Klasse CompletionProposal
      Parameter:
      proposals - the list of required completion proposals, or null if none
    • findParameterNames

      public char[][] findParameterNames(org.eclipse.core.runtime.IProgressMonitor monitor)
      Beschreibung aus Klasse kopiert: CompletionProposal
      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.

      Setzt außer Kraft:
      findParameterNames in Klasse CompletionProposal
      Parameter:
      monitor - the progress monitor, or null if none
      Gibt zurück:
      the parameter names, or null if none or not available or not relevant
    • setParameterNames

      public void setParameterNames(char[][] parameterNames)
      Beschreibung aus Klasse kopiert: CompletionProposal
      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.

      Setzt außer Kraft:
      setParameterNames in Klasse CompletionProposal
      Parameter:
      parameterNames - the parameter names, or null if none
    • getAccessibility

      public int getAccessibility()
      Beschreibung aus Klasse kopiert: CompletionProposal
      Returns the accessibility of the proposal.

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

      • TYPE_REF - accessibility of the type
      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.
      Setzt außer Kraft:
      getAccessibility in Klasse CompletionProposal
      Gibt zurück:
      the accessibility of the proposal
      Siehe auch:
    • isConstructor

      public boolean isConstructor()
      Beschreibung aus Klasse kopiert: CompletionProposal
      Returns whether this proposal is a constructor.

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

      • METHOD_REF - return true if the referenced method is a constructor
      • METHOD_DECLARATION - return true if the declared method is a constructor
      For kinds of completion proposals, this method returns false.
      Setzt außer Kraft:
      isConstructor in Klasse CompletionProposal
      Gibt zurück:
      true if the proposal is a constructor.
    • getReceiverSignature

      public char[] getReceiverSignature()
      Beschreibung aus Klasse kopiert: CompletionProposal
      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:

      • FIELD_REF_WITH_CASTED_RECEIVER - type signature of the type that cast the receiver of the field that is referenced
      • METHOD_REF_WITH_CASTED_RECEIVER - type signature of the type that cast the receiver of the method that is referenced
      For kinds of completion proposals, this method returns null. Clients must not modify the array returned.
      Setzt außer Kraft:
      getReceiverSignature in Klasse CompletionProposal
      Gibt zurück:
      a type signature or a package name (depending on the kind of completion), or null if none
      Siehe auch:
    • getReceiverStart

      public int getReceiverStart()
      Beschreibung aus Klasse kopiert: CompletionProposal
      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:

      • FIELD_REF_WITH_CASTED_RECEIVER
      • METHOD_REF_WITH_CASTED_RECEIVER
      For kinds of completion proposals, this method returns 0.
      Setzt außer Kraft:
      getReceiverStart in Klasse CompletionProposal
      Gibt zurück:
      character index of receiver start position (inclusive)
    • getReceiverEnd

      public int getReceiverEnd()
      Beschreibung aus Klasse kopiert: CompletionProposal
      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:

      • FIELD_REF_WITH_CASTED_RECEIVER
      • METHOD_REF_WITH_CASTED_RECEIVER
      For kinds of completion proposals, this method returns 0.
      Setzt außer Kraft:
      getReceiverEnd in Klasse CompletionProposal
      Gibt zurück:
      character index of receiver end position (exclusive)
    • setReceiverSignature

      public void setReceiverSignature(char[] signature)
      Beschreibung aus Klasse kopiert: CompletionProposal
      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.

      Setzt außer Kraft:
      setReceiverSignature in Klasse CompletionProposal
      Parameter:
      signature - the type or package signature, or null if none
    • setReceiverRange

      public void setReceiverRange(int startIndex, int endIndex)
      Beschreibung aus Klasse kopiert: CompletionProposal
      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).

      Setzt außer Kraft:
      setReceiverRange in Klasse CompletionProposal
      Parameter:
      startIndex - character index of receiver start position (inclusive)
      endIndex - character index of receiver end position (exclusive)
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • canUseDiamond

      public boolean canUseDiamond(CompletionContext coreContext)
      Beschreibung aus Klasse kopiert: CompletionProposal
      Returns 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:
      canUseDiamond in Klasse CompletionProposal
      Parameter:
      coreContext - the completion context associated with the proposal
      Gibt zurück:
      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
    • getArrayDimensions

      public int getArrayDimensions()
      Beschreibung aus Klasse kopiert: CompletionProposal
      Returns the dimension count if this proposal holds a array completion.

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

      • TYPE_REF - return dimension count if the referenced type is an array, otherwise 0.
      For other kinds of completion proposals, this method returns 0.
      Setzt außer Kraft:
      getArrayDimensions in Klasse CompletionProposal
      Gibt zurück:
      dimension count or 0 for non array TYPE_REF proposals.
    • setArrayDimensions

      public void setArrayDimensions(int dimensions)
    • getDeclarationTypeVariables

      public char[][] getDeclarationTypeVariables()
      Returns the type variables of the declaring type corresponding to this proposal. If not set, defaults to null.
      Gibt zurück:
      the type variable names
    • setDeclarationTypeVariables

      public void setDeclarationTypeVariables(char[][] declarationTypeVariables)
    • isCompatibleProposal

      public boolean isCompatibleProposal()
      Returns whether the completion proposal is a context-compatible proposal.
    • setCompatibleProposal

      public void setCompatibleProposal(boolean isCompatibleProposal)