Class AbstractJavaSourceCompletion

java.lang.Object
org.fife.ui.autocomplete.AbstractCompletion
org.fife.ui.autocomplete.BasicCompletion
org.fife.rsta.ac.java.AbstractJavaSourceCompletion
All Implemented Interfaces:
Comparable<org.fife.ui.autocomplete.Completion>, JavaSourceCompletion, org.fife.ui.autocomplete.Completion
Direct Known Subclasses:
ClassCompletion, FieldCompletion, LocalVariableCompletion, PackageNameCompletion

public abstract class AbstractJavaSourceCompletion extends org.fife.ui.autocomplete.BasicCompletion implements JavaSourceCompletion
Base class for Java source completions.
Version:
1.0
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractJavaSourceCompletion(org.fife.ui.autocomplete.CompletionProvider provider, String replacementText)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    compareTo(org.fife.ui.autocomplete.Completion c2)
    Overridden to ensure that two completions don't just have the same text value (ignoring case), but that they're of the same "type" of Completion as well, so, for example, a completion for the "String" class won't clash with a completion for a "string" LocalVar.
     

    Methods inherited from class org.fife.ui.autocomplete.BasicCompletion

    getReplacementText, getShortDescription, getSummary, setShortDescription, setSummary, toString

    Methods inherited from class org.fife.ui.autocomplete.AbstractCompletion

    getIcon, getInputText, getProvider, getRelevance, getToolTipText, setIcon, setRelevance

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.fife.ui.autocomplete.Completion

    getIcon, getInputText, getProvider, getRelevance, getReplacementText, getSummary, getToolTipText

    Methods inherited from interface JavaSourceCompletion

    equals, rendererText
  • Constructor Details

    • AbstractJavaSourceCompletion

      protected AbstractJavaSourceCompletion(org.fife.ui.autocomplete.CompletionProvider provider, String replacementText)
  • Method Details

    • compareTo

      public int compareTo(org.fife.ui.autocomplete.Completion c2)
      Overridden to ensure that two completions don't just have the same text value (ignoring case), but that they're of the same "type" of Completion as well, so, for example, a completion for the "String" class won't clash with a completion for a "string" LocalVar.
      Specified by:
      compareTo in interface Comparable<org.fife.ui.autocomplete.Completion>
      Specified by:
      compareTo in interface org.fife.ui.autocomplete.Completion
      Overrides:
      compareTo in class org.fife.ui.autocomplete.AbstractCompletion
      Parameters:
      c2 - Another completion instance.
      Returns:
      How this completion compares to the other one.
    • getAlreadyEntered

      public String getAlreadyEntered(JTextComponent comp)
      Specified by:
      getAlreadyEntered in interface org.fife.ui.autocomplete.Completion
      Overrides:
      getAlreadyEntered in class org.fife.ui.autocomplete.AbstractCompletion