org.fife.rsta.ac
Interface LanguageSupport

All Known Implementing Classes:
AbstractLanguageSupport, CLanguageSupport, GroovyLanguageSupport, HtmlLanguageSupport, JavaLanguageSupport, PerlLanguageSupport, PhpLanguageSupport, ShellLanguageSupport

public interface LanguageSupport

"Extra" support for a programming language (code completion, parser, etc.).

Version:
1.0
Author:
Robert Futrell

Field Summary
static String PROPERTY_LANGUAGE_PARSER
          Client property set on RSyntaxTextAreas referencing the Parser instance parsing its source code.
 
Method Summary
 int getAutoActivationDelay()
          Returns the delay between when the user types a character and when the code completion popup should automatically appear (if applicable).
 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.
 void install(RSyntaxTextArea textArea)
          Installs this support.
 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.
 void uninstall(RSyntaxTextArea textArea)
          Uninstalls this support.
 

Field Detail

PROPERTY_LANGUAGE_PARSER

static final String PROPERTY_LANGUAGE_PARSER
Client property set on RSyntaxTextAreas referencing the Parser instance parsing its source code. This will be null if 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 if isAutoActivationEnabled() returns true.

Returns:
The delay, in milliseconds.
See Also:
setAutoActivationDelay(int)

getDefaultCompletionCellRenderer

ListCellRenderer 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 is false, then ctrl+space will do nothing.

Returns:
Whether auto-completion is enabled.
See Also:
setAutoCompleteEnabled(boolean)

install

void install(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 if isAutoActivationEnabled() returns true.

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 to false, then ctrl+space will do nothing.

Parameters:
enabled - Whether auto-completion should be enabled.
See Also:
isAutoCompleteEnabled()

setDefaultCompletionCellRenderer

void setDefaultCompletionCellRenderer(ListCellRenderer 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 is null, 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(RSyntaxTextArea textArea)
Uninstalls this support.

Parameters:
textArea - The text area to uninstall from.
See Also:
install(RSyntaxTextArea)


Copyright © 2003-2011. All Rights Reserved.