|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fife.rsta.ac.AbstractLanguageSupport
public abstract class AbstractLanguageSupport
A base class for language support implementations.
| Field Summary |
|---|
| Fields inherited from interface org.fife.rsta.ac.LanguageSupport |
|---|
PROPERTY_LANGUAGE_PARSER |
| Constructor Summary | |
|---|---|
protected |
AbstractLanguageSupport()
Constructor. |
| Method Summary | |
|---|---|
protected AutoCompletion |
createAutoCompletion(CompletionProvider p)
Creates an auto-completion instance pre-configured and usable by most LanguageSupports. |
protected ListCellRenderer |
createDefaultCompletionCellRenderer()
Creates the default cell renderer to use when none is specified. |
int |
getAutoActivationDelay()
Returns the delay between when the user types a character and when the code completion popup should automatically appear (if applicable). |
protected AutoCompletion |
getAutoCompletionFor(RSyntaxTextArea textArea)
Returns the auto completion instance used by a text area. |
ListCellRenderer |
getDefaultCompletionCellRenderer()
Returns the default list cell renderer to install for all text areas with this language support installed. |
boolean |
getShowDescWindow()
REturns whether the description window is also shown when the completion list is displayed, for editors of this language. |
protected Set |
getTextAreas()
Returns the text areas with this language support currently installed. |
protected void |
installImpl(RSyntaxTextArea textArea,
AutoCompletion ac)
Registers an auto-completion instance. |
boolean |
isAutoActivationEnabled()
Returns whether auto-activation is enabled (that is, whether the completion popup will automatically appear after a delay when the user types an appropriate character). |
boolean |
isAutoCompleteEnabled()
Returns whether auto-completion is enabled for this language. |
boolean |
isParameterAssistanceEnabled()
Returns whether parameter assistance is enabled for editors of this language. |
void |
setAutoActivationDelay(int ms)
Sets the delay between when the user types a character and when the code completion popup should automatically appear (if applicable). |
void |
setAutoActivationEnabled(boolean enabled)
Toggles whether auto-activation is enabled. |
void |
setAutoCompleteEnabled(boolean enabled)
Toggles whether auto-completion is enabled for this language. |
void |
setDefaultCompletionCellRenderer(ListCellRenderer r)
Sets the default list cell renderer to install for all text areas with this language support installed. |
void |
setParameterAssistanceEnabled(boolean enabled)
Toggles whether parameter assistance is enabled for editors of this language. |
void |
setShowDescWindow(boolean show)
Toggles whether the description window should also be shown when the completion list is displayed, for editors of this language. |
protected void |
uninstallImpl(RSyntaxTextArea textArea)
Unregisters an textArea. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.fife.rsta.ac.LanguageSupport |
|---|
install, uninstall |
| Constructor Detail |
|---|
protected AbstractLanguageSupport()
| Method Detail |
|---|
protected AutoCompletion createAutoCompletion(CompletionProvider p)
LanguageSupports.
p - The completion provider.
protected ListCellRenderer createDefaultCompletionCellRenderer()
public int getAutoActivationDelay()
LanguageSupport.isAutoActivationEnabled()
returns true.
getAutoActivationDelay in interface LanguageSupportLanguageSupport.setAutoActivationDelay(int)protected AutoCompletion getAutoCompletionFor(RSyntaxTextArea textArea)
textArea - The text area.
null if none
is installed on the text area.public ListCellRenderer getDefaultCompletionCellRenderer()
getDefaultCompletionCellRenderer in interface LanguageSupportnull.LanguageSupport.setDefaultCompletionCellRenderer(ListCellRenderer)public boolean getShowDescWindow()
getShowDescWindow in interface LanguageSupportLanguageSupport.setShowDescWindow(boolean)protected Set getTextAreas()
protected void installImpl(RSyntaxTextArea textArea,
AutoCompletion ac)
LanguageSupport.install(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea) methods
so that this language support can update all of them at once.
textArea - The text area that just installed the auto completion.ac - The auto completion instance.uninstallImpl(RSyntaxTextArea)public boolean isAutoActivationEnabled()
isAutoActivationEnabled in interface LanguageSupportLanguageSupport.setAutoActivationEnabled(boolean),
LanguageSupport.getAutoActivationDelay(),
LanguageSupport.isAutoCompleteEnabled()public boolean isAutoCompleteEnabled()
false, then ctrl+space will
do nothing.
isAutoCompleteEnabled in interface LanguageSupportLanguageSupport.setAutoCompleteEnabled(boolean)public boolean isParameterAssistanceEnabled()
isParameterAssistanceEnabled in interface LanguageSupportLanguageSupport.setParameterAssistanceEnabled(boolean)public void setAutoActivationDelay(int ms)
LanguageSupport.isAutoActivationEnabled()
returns true.
setAutoActivationDelay in interface LanguageSupportms - The delay, in milliseconds. This should be greater than zero.LanguageSupport.getAutoActivationDelay()public void setAutoActivationEnabled(boolean enabled)
setAutoActivationEnabled in interface LanguageSupportenabled - Whether auto-activation is enabled.LanguageSupport.isAutoActivationEnabled(),
LanguageSupport.setAutoActivationDelay(int)public void setAutoCompleteEnabled(boolean enabled)
false, then ctrl+space will
do nothing.
setAutoCompleteEnabled in interface LanguageSupportenabled - Whether auto-completion should be enabled.LanguageSupport.isAutoCompleteEnabled()public void setDefaultCompletionCellRenderer(ListCellRenderer r)
setDefaultCompletionCellRenderer in interface LanguageSupportr - The renderer. If this is null, a default will
be used.LanguageSupport.getDefaultCompletionCellRenderer()public void setParameterAssistanceEnabled(boolean enabled)
setParameterAssistanceEnabled in interface LanguageSupportenabled - Whether parameter assistance is enabled.LanguageSupport.isParameterAssistanceEnabled()public void setShowDescWindow(boolean show)
setShowDescWindow in interface LanguageSupportshow - Whether to show the description window.LanguageSupport.getShowDescWindow()protected void uninstallImpl(RSyntaxTextArea textArea)
LanguageSupport.uninstall(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea) methods.
This method will also call the uninstall method on the
AutoComplete.
textArea - The text area.installImpl(RSyntaxTextArea, AutoCompletion)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||