org.fife.rsta.ac
Class LanguageSupportFactory

java.lang.Object
  extended by org.fife.rsta.ac.LanguageSupportFactory
All Implemented Interfaces:
PropertyChangeListener, EventListener

public class LanguageSupportFactory
extends Object
implements PropertyChangeListener

Provides language support (code completion, etc.) for programming languages in RSyntaxTextArea. Different languages may have varying levels of "support."

Version:
1.0
Author:
Robert Futrell

Method Summary
static LanguageSupportFactory get()
          Returns the singleton instance of this class.
 LanguageSupport getSupportFor(String style)
          Returns the language support for a programming language.
 void propertyChange(PropertyChangeEvent e)
          Listens for RSyntaxTextAreas to change what language they're highlighting, so language support can be updated appropriately.
 void register(RSyntaxTextArea textArea)
          Registers an RSyntaxTextArea to receive language support.
 void unregister(RSyntaxTextArea textArea)
          Un-registers an RSyntaxTextArea.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public static LanguageSupportFactory get()
Returns the singleton instance of this class.

Returns:
The singleton instance.

getSupportFor

public LanguageSupport getSupportFor(String style)
Returns the language support for a programming language.

Parameters:
style - The language. This should be one of the constants defined in SyntaxConstants.
Returns:
The language support, or null if none is registered for the language specified.

propertyChange

public void propertyChange(PropertyChangeEvent e)
Listens for RSyntaxTextAreas to change what language they're highlighting, so language support can be updated appropriately.

Specified by:
propertyChange in interface PropertyChangeListener
Parameters:
e - The event.

register

public void register(RSyntaxTextArea textArea)
Registers an RSyntaxTextArea to receive language support. The text area will get support for the currently highlighted language, and if it changes what language it is highlighting, the support will change as appropriate.

Parameters:
textArea - The text area to register.

unregister

public void unregister(RSyntaxTextArea textArea)
Un-registers an RSyntaxTextArea. This removes any language support on it.

Parameters:
textArea - The text area.
See Also:
register(RSyntaxTextArea)


Copyright © 2003-2011. All Rights Reserved.