Class FieldCompletion

java.lang.Object
org.fife.ui.autocomplete.AbstractCompletion
org.fife.ui.autocomplete.BasicCompletion
org.fife.rsta.ac.java.AbstractJavaSourceCompletion
org.fife.rsta.ac.java.FieldCompletion
All Implemented Interfaces:
Comparable<org.fife.ui.autocomplete.Completion>, JavaSourceCompletion, MemberCompletion, org.fife.ui.autocomplete.Completion

class FieldCompletion extends AbstractJavaSourceCompletion implements MemberCompletion
A completion for a Java field. This completion gets its information from one of two sources:
  • A FieldInfo instance, which is loaded by parsing a class file. This is used when this completion represents a field found in a compiled library.
  • A Field instance, which is created when parsing a Java source file. This is used when the completion represents a field found in uncompiled source, such as the source in an RSyntaxTextArea, or in a loose file on disk.
Version:
1.0
  • Field Details

    • data

      private MemberCompletion.Data data
    • RELEVANCE

      private static final int RELEVANCE
      The relevance of fields. This allows fields to be "higher" in the completion list than other types.
      See Also:
  • Constructor Details

    • FieldCompletion

      FieldCompletion(org.fife.ui.autocomplete.CompletionProvider provider, Field field)
    • FieldCompletion

      FieldCompletion(org.fife.ui.autocomplete.CompletionProvider provider, FieldInfo info)
    • FieldCompletion

      private FieldCompletion(org.fife.ui.autocomplete.CompletionProvider provider, String text)
  • Method Details

    • equals

      public boolean equals(Object obj)
      Description copied from interface: JavaSourceCompletion
      Force subclasses to override equals(). TODO: Remove me
      Specified by:
      equals in interface JavaSourceCompletion
      Overrides:
      equals in class Object
    • createLengthCompletion

      public static FieldCompletion createLengthCompletion(org.fife.ui.autocomplete.CompletionProvider provider, Type type)
    • getEnclosingClassName

      public String getEnclosingClassName(boolean fullyQualified)
      Description copied from interface: MemberCompletion
      Returns the name of the enclosing class.
      Specified by:
      getEnclosingClassName in interface MemberCompletion
      Parameters:
      fullyQualified - Whether the name returned should be fully qualified.
      Returns:
      The class name.
    • getIcon

      public Icon getIcon()
      Specified by:
      getIcon in interface org.fife.ui.autocomplete.Completion
      Overrides:
      getIcon in class org.fife.ui.autocomplete.AbstractCompletion
    • getSignature

      public String getSignature()
      Description copied from interface: MemberCompletion
      Returns the signature of this member.
      Specified by:
      getSignature in interface MemberCompletion
      Returns:
      The signature.
    • getSummary

      public String getSummary()
      Specified by:
      getSummary in interface org.fife.ui.autocomplete.Completion
      Overrides:
      getSummary in class org.fife.ui.autocomplete.BasicCompletion
    • getType

      public String getType()
      Description copied from interface: MemberCompletion
      Returns the type of this member (the return type for methods).
      Specified by:
      getType in interface MemberCompletion
      Returns:
      The type of this member.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isDeprecated

      public boolean isDeprecated()
      Description copied from interface: MemberCompletion
      Returns whether this member is deprecated.
      Specified by:
      isDeprecated in interface MemberCompletion
      Returns:
      Whether this member is deprecated.
    • rendererText

      public void rendererText(Graphics g, int x, int y, boolean selected)
      Description copied from interface: JavaSourceCompletion
      Used by JavaCellRenderer to render this completion choice.
      Specified by:
      rendererText in interface JavaSourceCompletion
      Parameters:
      g - The graphics context to render to.
      x - The x-offset at which to render.
      y - The y-offset at which to render.
      selected - Whether this completion is currently selected/active.