Class MarkupTagCompletion

  • All Implemented Interfaces:
    java.lang.Comparable<Completion>, Completion

    public class MarkupTagCompletion
    extends AbstractCompletion
    A completion representing a tag in markup, such as HTML or XML.
    Version:
    1.0
    • Field Detail

      • name

        private java.lang.String name
      • desc

        private java.lang.String desc
      • definedIn

        private java.lang.String definedIn
    • Constructor Detail

      • MarkupTagCompletion

        public MarkupTagCompletion​(CompletionProvider provider,
                                   java.lang.String name)
        Constructor.
        Parameters:
        provider - The parent provider instance.
        name - The name of the tag.
    • Method Detail

      • addAttributes

        protected void addAttributes​(java.lang.StringBuilder sb)
        Adds HTML describing the attributes of this tag to a buffer.
        Parameters:
        sb - The buffer to append to.
      • addDefinitionString

        protected void addDefinitionString​(java.lang.StringBuilder sb)
      • getAttributeCount

        public int getAttributeCount()
        Returns the number of attributes of this tag.
        Returns:
        The number of attributes of this tag.
        See Also:
        getAttribute(int)
      • getDefinedIn

        public java.lang.String getDefinedIn()
        Returns where this variable is defined.
        Returns:
        Where this variable is defined.
        See Also:
        setDefinedIn(String)
      • getDescription

        public java.lang.String getDescription()
        Returns a short description of this variable. This should be an HTML snippet.
        Returns:
        A short description of this variable. This may be null.
        See Also:
        setDescription(String)
      • getName

        public java.lang.String getName()
        Returns the name of this tag.
        Returns:
        The name of this tag.
      • getReplacementText

        public java.lang.String getReplacementText()
        Description copied from interface: Completion
        Returns the text to insert as the result of this auto-completion. This is the "complete" text, including any text that replaces what the user has already typed.
        Returns:
        The replacement text.
        See Also:
        Completion.getInputText()
      • getSummary

        public java.lang.String getSummary()
        Description copied from interface: Completion
        Returns the description of this auto-complete choice. This can be used in a popup "description window."
        Returns:
        This item's description. This should be HTML. It may be null if there is no description for this completion.
      • possiblyAddDefinedIn

        protected void possiblyAddDefinedIn​(java.lang.StringBuilder sb)
        Adds some HTML describing where this variable is defined, if this information is known.
        Parameters:
        sb - The buffer to append to.
      • possiblyAddDescription

        protected void possiblyAddDescription​(java.lang.StringBuilder sb)
        Adds the description text as HTML to a buffer, if a description is defined.
        Parameters:
        sb - The buffer to append to.
      • setDefinedIn

        public void setDefinedIn​(java.lang.String definedIn)
        Sets where this variable is defined.
        Parameters:
        definedIn - Where this variable is defined.
        See Also:
        getDefinedIn()
      • setDescription

        public void setDescription​(java.lang.String desc)
        Sets the short description of this tag. This should be an HTML snippet.
        Parameters:
        desc - A short description of this tag. This may be null.
        See Also:
        getDescription()