JIDE 3.5.15

com.jidesoft.editor.language
Class LanguageSpecManager

java.lang.Object
  extended by com.jidesoft.editor.language.LanguageSpecManager

public class LanguageSpecManager
extends Object

LanguageSpecManager keeps a list of known LanguageSpec. We registered several lanaguages on it already. You can add more based on what you need. The languages we registered are Java, JSP, C, C++, HTML, XML, PHP, Python, PLSQL, TSQL, Perl, VHDL and Verilog.

LanguageSpecManager is a singleton. You use it by calling getInstance().


Constructor Summary
protected LanguageSpecManager()
           
 
Method Summary
static LanguageSpecManager getInstance()
           
 LanguageSpec getLanguageSpec(String langName)
          Gets the LanguageSpec that matches the specified name.
 LanguageSpec[] getLanguageSpecs()
          Gets all LanguageSpecs registered on this manager.
protected  void initDefaultLanguageSpecs()
           
 void registerLanguageSpec(LanguageSpec spec)
          Registers a new LanguageSpec.
 void unregisterLanguageSpec(String langName)
          Unregisters a LanguageSpec.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LanguageSpecManager

protected LanguageSpecManager()
Method Detail

getInstance

public static LanguageSpecManager getInstance()

initDefaultLanguageSpecs

protected void initDefaultLanguageSpecs()

getLanguageSpec

public LanguageSpec getLanguageSpec(String langName)
Gets the LanguageSpec that matches the specified name.

Parameters:
langName - the language name.
Returns:
the LanguageSpec that matches the specified name. Null if it is not found or the langName parameter is null.

getLanguageSpecs

public LanguageSpec[] getLanguageSpecs()
Gets all LanguageSpecs registered on this manager.

Returns:
all LanguageSpecs registered on this manager.

registerLanguageSpec

public void registerLanguageSpec(LanguageSpec spec)
Registers a new LanguageSpec. Please note, if the new LanguageSpec has the same name as one of the existing LanguageSpec, the new one will override the old one.

Parameters:
spec - the LanguageSpec to be registered.

unregisterLanguageSpec

public void unregisterLanguageSpec(String langName)
Unregisters a LanguageSpec.

Parameters:
langName - the language name

JIDE 3.5.15