java.lang.Object
de.grogra.pf.ui.autocomplete.impl.AbstractCompletion
de.grogra.pf.ui.autocomplete.impl.MarkupTagCompletion
- All Implemented Interfaces:
Completion
,Comparable<Completion>
A completion representing a tag in markup, such as HTML or XML.
- Version:
- 1.0
- Author:
- Robert Futrell
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Adds HTML describing the attributes of this tag to a buffer.protected void
getAttribute
(int index) Returns the specifiedParameterizedCompletion.Parameter
.int
Returns the number of attributes of this tag.Returns all attributes of this tag.Returns where this variable is defined.Returns a short description of this variable.getName()
Returns the name of this tag.Returns the text to insert as the result of this auto-completion.Returns the description of this auto-complete choice.protected void
Adds some HTML describing where this variable is defined, if this information is known.protected void
Adds the description text as HTML to a buffer, if a description is defined.void
setAttributes
(List<? extends ParameterizedCompletion.Parameter> attrs) Sets the attributes of this tag.void
setDefinedIn
(String definedIn) Sets where this variable is defined.void
setDescription
(String desc) Sets the short description of this tag.Methods inherited from class de.grogra.pf.ui.autocomplete.impl.AbstractCompletion
compareTo, getAlreadyEntered, getCompareString, getIcon, getInputText, getProvider, getRelevance, getToolTipText, setIcon, setRelevance, toString
-
Constructor Details
-
MarkupTagCompletion
Constructor.- Parameters:
provider
- The parent provider instance.name
- The name of the tag.
-
-
Method Details
-
addAttributes
Adds HTML describing the attributes of this tag to a buffer.- Parameters:
sb
- The buffer to append to.
-
addDefinitionString
-
getAttributes
Returns all attributes of this tag.- Returns:
- A list of
ParameterizedCompletion.Parameter
s. - See Also:
-
getAttribute
Returns the specifiedParameterizedCompletion.Parameter
.- Parameters:
index
- The index of the attribute to retrieve.- Returns:
- The attribute.
- See Also:
-
getAttributeCount
public int getAttributeCount()Returns the number of attributes of this tag.- Returns:
- The number of attributes of this tag.
- See Also:
-
getDefinedIn
Returns where this variable is defined.- Returns:
- Where this variable is defined.
- See Also:
-
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:
-
getName
Returns the name of this tag.- Returns:
- The name of this tag.
-
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:
-
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
Adds some HTML describing where this variable is defined, if this information is known.- Parameters:
sb
- The buffer to append to.
-
possiblyAddDescription
Adds the description text as HTML to a buffer, if a description is defined.- Parameters:
sb
- The buffer to append to.
-
setDefinedIn
Sets where this variable is defined.- Parameters:
definedIn
- Where this variable is defined.- See Also:
-
setDescription
Sets the short description of this tag. This should be an HTML snippet.- Parameters:
desc
- A short description of this tag. This may benull
.- See Also:
-
setAttributes
Sets the attributes of this tag.- Parameters:
attrs
- The attributes.- See Also:
-