public abstract class AbstractLanguageSupport extends java.lang.Object implements LanguageSupport
PROPERTY_LANGUAGE_PARSER| Modifier | Constructor and Description |
|---|---|
protected |
AbstractLanguageSupport()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected AutoCompletion |
createAutoCompletion(CompletionProvider p)
Creates an auto-completion instance pre-configured and usable by
most
LanguageSupports. |
protected javax.swing.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.
|
javax.swing.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 java.util.Set<RSyntaxTextArea> |
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(javax.swing.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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinstall, uninstallprotected AutoCompletion createAutoCompletion(CompletionProvider p)
LanguageSupports.p - The completion provider.protected javax.swing.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 javax.swing.ListCellRenderer getDefaultCompletionCellRenderer()
getDefaultCompletionCellRenderer in interface LanguageSupportnull.LanguageSupport.setDefaultCompletionCellRenderer(ListCellRenderer)public boolean getShowDescWindow()
getShowDescWindow in interface LanguageSupportLanguageSupport.setShowDescWindow(boolean)protected java.util.Set<RSyntaxTextArea> getTextAreas()
protected void installImpl(RSyntaxTextArea textArea,
AutoCompletion ac)
#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(javax.swing.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)
#uninstall(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea) methods.
This method will also call the uninstall method on the
AutoCompletion.textArea - The text area.installImpl(RSyntaxTextArea, AutoCompletion)