|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.fife.ui.autocomplete.CompletionProviderBase
public abstract class CompletionProviderBase
A base class for all standard completion providers. This class implements functionality that should be sharable across all CompletionProvider implementations.
AbstractCompletionProvider| Field Summary | |
|---|---|
protected static String |
EMPTY_STRING
|
| Constructor Summary | |
|---|---|
CompletionProviderBase()
|
|
| Method Summary | |
|---|---|
void |
clearParameterizedCompletionParams()
Clears the values used to identify and insert "parameterized completions" (e.g. |
List |
getCompletions(JTextComponent comp)
Gets the possible completions for the text component at the current caret position. |
protected abstract List |
getCompletionsImpl(JTextComponent comp)
Does the dirty work of creating a list of completions. |
ListCellRenderer |
getListCellRenderer()
Returns the cell renderer for completions returned from this provider. |
ParameterChoicesProvider |
getParameterChoicesProvider()
Returns an object that can return a list of completion choices for parameters. |
char |
getParameterListEnd()
Returns the text that marks the end of a list of parameters to a function or method. |
String |
getParameterListSeparator()
Returns the text that separates parameters to a function or method. |
char |
getParameterListStart()
Returns the text that marks the start of a list of parameters to a function or method. |
CompletionProvider |
getParent()
Returns the parent completion provider. |
boolean |
isAutoActivateOkay(JTextComponent tc)
This method is called if auto-activation is enabled in the parent AutoCompletion after the user types a single character. |
void |
setAutoActivationRules(boolean letters,
String others)
Sets the characters that auto-activation should occur after. |
void |
setListCellRenderer(ListCellRenderer r)
Sets the renderer to use when displaying completion choices. |
void |
setParameterChoicesProvider(ParameterChoicesProvider pcp)
Sets the param choices provider. |
void |
setParameterizedCompletionParams(char listStart,
String separator,
char listEnd)
Sets the values used to identify and insert "parameterized completions" (e.g. |
void |
setParent(CompletionProvider parent)
Sets the parent completion provider. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.fife.ui.autocomplete.CompletionProvider |
|---|
getAlreadyEnteredText, getCompletionsAt, getParameterizedCompletions |
| Field Detail |
|---|
protected static final String EMPTY_STRING
| Constructor Detail |
|---|
public CompletionProviderBase()
| Method Detail |
|---|
public void clearParameterizedCompletionParams()
clearParameterizedCompletionParams in interface CompletionProviderCompletionProvider.setParameterizedCompletionParams(char, String, char)public List getCompletions(JTextComponent comp)
getCompletions in interface CompletionProvidercomp - The text component.
Completions. If no completions are
available, this may be null.protected abstract List getCompletionsImpl(JTextComponent comp)
comp - The text component to look in.
public ListCellRenderer getListCellRenderer()
getListCellRenderer in interface CompletionProvidernull if the default should
be used.CompletionProvider.setListCellRenderer(ListCellRenderer)public ParameterChoicesProvider getParameterChoicesProvider()
getParameterChoicesProvider in interface CompletionProvidernull if
none is installed.public char getParameterListEnd()
getParameterListEnd in interface CompletionProvider)'.CompletionProvider.getParameterListStart(),
CompletionProvider.getParameterListSeparator(),
CompletionProvider.setParameterizedCompletionParams(char, String, char)public String getParameterListSeparator()
getParameterListSeparator in interface CompletionProvider, ".CompletionProvider.getParameterListStart(),
CompletionProvider.getParameterListEnd(),
CompletionProvider.setParameterizedCompletionParams(char, String, char)public char getParameterListStart()
getParameterListStart in interface CompletionProvider(".CompletionProvider.getParameterListEnd(),
CompletionProvider.getParameterListSeparator(),
CompletionProvider.setParameterizedCompletionParams(char, String, char)public CompletionProvider getParent()
getParent in interface CompletionProviderCompletionProvider.setParent(CompletionProvider)public boolean isAutoActivateOkay(JTextComponent tc)
AutoCompletion after the user types a single character. This
provider should check the text at the current caret position of the
text component, and decide whether auto-activation would be appropriate
here. For example, a CompletionProvider for Java might
want to return true for this method only if the last
character typed was a '.'.
isAutoActivateOkay in interface CompletionProvidertc - The text component.
public void setAutoActivationRules(boolean letters,
String others)
others
to ".", to allow auto-activation for members of an object.
letters - Whether auto-activation should occur after any letter.others - A string of (non-letter) chars that auto-activation should
occur after. This may be null.public void setParameterChoicesProvider(ParameterChoicesProvider pcp)
pcp - The parameter choices provider, or null for
none.getParameterChoicesProvider()public void setListCellRenderer(ListCellRenderer r)
setListCellRenderer in interface CompletionProviderr - The renderer to use.CompletionProvider.getListCellRenderer()
public void setParameterizedCompletionParams(char listStart,
String separator,
char listEnd)
setParameterizedCompletionParams in interface CompletionProviderlistStart - The character that marks the beginning of a list of
parameters, such as '(' in C or Java.separator - Text that should separate parameters in a parameter
list when one is inserted. For example, ", ".listEnd - The character that marks the end of a list of parameters,
such as ')' in C or Java.CompletionProvider.clearParameterizedCompletionParams()public void setParent(CompletionProvider parent)
setParent in interface CompletionProviderparent - The parent provider. null means there will
be no parent provider.CompletionProvider.getParent()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||