Package org.fife.rsta.ac
Interface LanguageSupport
-
- All Known Implementing Classes:
AbstractLanguageSupport,AbstractMarkupLanguageSupport,Asm6502LanguageSupport,CLanguageSupport,CssLanguageSupport,GroovyLanguageSupport,HtmlLanguageSupport,JavaLanguageSupport,JavaScriptLanguageSupport,JspLanguageSupport,LessLanguageSupport,PerlLanguageSupport,PhpLanguageSupport,ShellLanguageSupport,TypeScriptLanguageSupport,XmlLanguageSupport
public interface LanguageSupport"Extra" support for a programming language (code completion, parser, etc.).- Version:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROPERTY_LANGUAGE_PARSERClient property set onRSyntaxTextAreas referencing theParserinstance parsing its source code.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetAutoActivationDelay()Returns the delay between when the user types a character and when the code completion popup should automatically appear (if applicable).javax.swing.ListCellRenderer<java.lang.Object>getDefaultCompletionCellRenderer()Returns the default list cell renderer to install for all text areas with this language support installed.booleangetShowDescWindow()REturns whether the description window is also shown when the completion list is displayed, for editors of this language.voidinstall(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)Installs this support.booleanisAutoActivationEnabled()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).booleanisAutoCompleteEnabled()Returns whether auto-completion is enabled for this language.booleanisParameterAssistanceEnabled()Returns whether parameter assistance is enabled for editors of this language.voidsetAutoActivationDelay(int ms)Sets the delay between when the user types a character and when the code completion popup should automatically appear (if applicable).voidsetAutoActivationEnabled(boolean enabled)Toggles whether auto-activation is enabled.voidsetAutoCompleteEnabled(boolean enabled)Toggles whether auto-completion is enabled for this language.voidsetDefaultCompletionCellRenderer(javax.swing.ListCellRenderer<java.lang.Object> r)Sets the default list cell renderer to install for all text areas with this language support installed.voidsetParameterAssistanceEnabled(boolean enabled)Toggles whether parameter assistance is enabled for editors of this language.voidsetShowDescWindow(boolean show)Toggles whether the description window should also be shown when the completion list is displayed, for editors of this language.voiduninstall(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)Uninstalls this support.
-
-
-
Field Detail
-
PROPERTY_LANGUAGE_PARSER
static final java.lang.String PROPERTY_LANGUAGE_PARSER
Client property set onRSyntaxTextAreas referencing theParserinstance parsing its source code. This will benullif a language support does not install such a parser.- See Also:
- Constant Field Values
-
-
Method Detail
-
getAutoActivationDelay
int getAutoActivationDelay()
Returns the delay between when the user types a character and when the code completion popup should automatically appear (if applicable). This parameter is only honored ifisAutoActivationEnabled()returnstrue.- Returns:
- The delay, in milliseconds.
- See Also:
setAutoActivationDelay(int)
-
getDefaultCompletionCellRenderer
javax.swing.ListCellRenderer<java.lang.Object> getDefaultCompletionCellRenderer()
Returns the default list cell renderer to install for all text areas with this language support installed.- Returns:
- The renderer. This will never be
null. - See Also:
setDefaultCompletionCellRenderer(ListCellRenderer)
-
getShowDescWindow
boolean getShowDescWindow()
REturns whether the description window is also shown when the completion list is displayed, for editors of this language.- Returns:
- Whether the description window is shown.
- See Also:
setShowDescWindow(boolean)
-
isAutoActivationEnabled
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). Note that this parameter will be ignored if auto-completion is disabled.- Returns:
- Whether auto-activation is enabled.
- See Also:
setAutoActivationEnabled(boolean),getAutoActivationDelay(),isAutoCompleteEnabled()
-
isAutoCompleteEnabled
boolean isAutoCompleteEnabled()
Returns whether auto-completion is enabled for this language. If this value isfalse, thenctrl+spacewill do nothing.- Returns:
- Whether auto-completion is enabled.
- See Also:
setAutoCompleteEnabled(boolean)
-
install
void install(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
Installs this support.- Parameters:
textArea- The text area to install onto.- See Also:
uninstall(RSyntaxTextArea)
-
isParameterAssistanceEnabled
boolean isParameterAssistanceEnabled()
Returns whether parameter assistance is enabled for editors of this language. Note that some language do not support parameter assistance at all; in those cases, this parameter does nothing.- Returns:
- Whether parameter assistance is enabled for editors of this language.
- See Also:
setParameterAssistanceEnabled(boolean)
-
setAutoActivationDelay
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). This parameter is only honored ifisAutoActivationEnabled()returnstrue.- Parameters:
ms- The delay, in milliseconds. This should be greater than zero.- See Also:
getAutoActivationDelay()
-
setAutoActivationEnabled
void setAutoActivationEnabled(boolean enabled)
Toggles whether auto-activation is enabled. Note that auto-activation also depends on auto-completion itself being enabled.- Parameters:
enabled- Whether auto-activation is enabled.- See Also:
isAutoActivationEnabled(),setAutoActivationDelay(int)
-
setAutoCompleteEnabled
void setAutoCompleteEnabled(boolean enabled)
Toggles whether auto-completion is enabled for this language. If this is set tofalse, thenctrl+spacewill do nothing.- Parameters:
enabled- Whether auto-completion should be enabled.- See Also:
isAutoCompleteEnabled()
-
setDefaultCompletionCellRenderer
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. This renderer will be shared amongst all text areas.- Parameters:
r- The renderer. If this isnull, a default will be used.- See Also:
getDefaultCompletionCellRenderer()
-
setParameterAssistanceEnabled
void setParameterAssistanceEnabled(boolean enabled)
Toggles whether parameter assistance is enabled for editors of this language.- Parameters:
enabled- Whether parameter assistance is enabled.- See Also:
isParameterAssistanceEnabled()
-
setShowDescWindow
void setShowDescWindow(boolean show)
Toggles whether the description window should also be shown when the completion list is displayed, for editors of this language.- Parameters:
show- Whether to show the description window.- See Also:
getShowDescWindow()
-
uninstall
void uninstall(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
Uninstalls this support.- Parameters:
textArea- The text area to uninstall from.- See Also:
install(RSyntaxTextArea)
-
-