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 final String
    Client property set on RSyntaxTextAreas referencing the Parser instance parsing its source code.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the delay between when the user types a character and when the code completion popup should automatically appear (if applicable).
    Returns the default list cell renderer to install for all text areas with this language support installed.
    boolean
    REturns whether the description window is also shown when the completion list is displayed, for editors of this language.
    void
    install(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
    Installs this support.
    boolean
    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
    Returns whether auto-completion is enabled for this language.
    boolean
    Returns whether parameter assistance is enabled for editors of this language.
    void
    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
    Sets the default list cell renderer to install for all text areas with this language support installed.
    void
    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(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
    Uninstalls this support.
  • Field Details

    • 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:
  • Method Details

    • 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:
    • getDefaultCompletionCellRenderer

      ListCellRenderer<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:
    • 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:
    • 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:
    • 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:
    • install

      void install(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
      Installs this support.
      Parameters:
      textArea - The text area to install onto.
      See Also:
    • 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:
    • 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:
    • 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:
    • 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:
    • setDefaultCompletionCellRenderer

      void setDefaultCompletionCellRenderer(ListCellRenderer<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 is null, a default will be used.
      See Also:
    • 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:
    • 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:
    • uninstall

      void uninstall(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
      Uninstalls this support.
      Parameters:
      textArea - The text area to uninstall from.
      See Also: