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 org.fife.ui.autocomplete.AutoCompletion |
createAutoCompletion(org.fife.ui.autocomplete.CompletionProvider p)
Creates an auto-completion instance pre-configured and usable by
most
LanguageSupports. |
protected javax.swing.ListCellRenderer<java.lang.Object> |
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 org.fife.ui.autocomplete.AutoCompletion |
getAutoCompletionFor(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
Returns the auto-completion instance used by a text area.
|
javax.swing.ListCellRenderer<java.lang.Object> |
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<org.fife.ui.rsyntaxtextarea.RSyntaxTextArea> |
getTextAreas()
Returns the text areas with this language support currently installed.
|
protected void |
installImpl(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea,
org.fife.ui.autocomplete.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<java.lang.Object> 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(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
Unregisters an textArea.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinstall, uninstallprotected org.fife.ui.autocomplete.AutoCompletion createAutoCompletion(org.fife.ui.autocomplete.CompletionProvider p)
LanguageSupports.p - The completion provider.protected javax.swing.ListCellRenderer<java.lang.Object> createDefaultCompletionCellRenderer()
public int getAutoActivationDelay()
LanguageSupportLanguageSupport.isAutoActivationEnabled()
returns true.getAutoActivationDelay in interface LanguageSupportLanguageSupport.setAutoActivationDelay(int)protected org.fife.ui.autocomplete.AutoCompletion getAutoCompletionFor(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
textArea - The text area.null if none
is installed on the text area.public javax.swing.ListCellRenderer<java.lang.Object> getDefaultCompletionCellRenderer()
LanguageSupportgetDefaultCompletionCellRenderer in interface LanguageSupportnull.LanguageSupport.setDefaultCompletionCellRenderer(ListCellRenderer)public boolean getShowDescWindow()
LanguageSupportgetShowDescWindow in interface LanguageSupportLanguageSupport.setShowDescWindow(boolean)protected java.util.Set<org.fife.ui.rsyntaxtextarea.RSyntaxTextArea> getTextAreas()
protected void installImpl(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea, org.fife.ui.autocomplete.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()
LanguageSupportisAutoActivationEnabled in interface LanguageSupportLanguageSupport.setAutoActivationEnabled(boolean),
LanguageSupport.getAutoActivationDelay(),
LanguageSupport.isAutoCompleteEnabled()public boolean isAutoCompleteEnabled()
LanguageSupportfalse, then ctrl+space will
do nothing.isAutoCompleteEnabled in interface LanguageSupportLanguageSupport.setAutoCompleteEnabled(boolean)public boolean isParameterAssistanceEnabled()
LanguageSupportisParameterAssistanceEnabled in interface LanguageSupportLanguageSupport.setParameterAssistanceEnabled(boolean)public void setAutoActivationDelay(int ms)
LanguageSupportLanguageSupport.isAutoActivationEnabled()
returns true.setAutoActivationDelay in interface LanguageSupportms - The delay, in milliseconds. This should be greater than zero.LanguageSupport.getAutoActivationDelay()public void setAutoActivationEnabled(boolean enabled)
LanguageSupportsetAutoActivationEnabled in interface LanguageSupportenabled - Whether auto-activation is enabled.LanguageSupport.isAutoActivationEnabled(),
LanguageSupport.setAutoActivationDelay(int)public void setAutoCompleteEnabled(boolean enabled)
LanguageSupportfalse, then ctrl+space will
do nothing.setAutoCompleteEnabled in interface LanguageSupportenabled - Whether auto-completion should be enabled.LanguageSupport.isAutoCompleteEnabled()public void setDefaultCompletionCellRenderer(javax.swing.ListCellRenderer<java.lang.Object> r)
LanguageSupportsetDefaultCompletionCellRenderer in interface LanguageSupportr - The renderer. If this is null, a default will
be used.LanguageSupport.getDefaultCompletionCellRenderer()public void setParameterAssistanceEnabled(boolean enabled)
LanguageSupportsetParameterAssistanceEnabled in interface LanguageSupportenabled - Whether parameter assistance is enabled.LanguageSupport.isParameterAssistanceEnabled()public void setShowDescWindow(boolean show)
LanguageSupportsetShowDescWindow in interface LanguageSupportshow - Whether to show the description window.LanguageSupport.getShowDescWindow()protected void uninstallImpl(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
LanguageSupport.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)