public interface LanguageSupport
LanguageSupport interface is essentially a directory listing for language-specific support services such as syntax highlighting or formatting for a given language. Each instance is associated with a single document. This allows various actions and view renderers to share the same services (such as a scanner for auto-indentation.)
Note, the various services provided by a single LanguageSupport instance, such as the DocumentRenderer, is not intended to be used by multiple clients simultaneously. An example of this incorrect usage would be for a renderer and formatter to be using the same Scanner provided by the LanguageSupport. For now, there are no plans in place for enforcing this policy.
LanguageRegistry, LanguageModule| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
PROPERTY_LINE_COMMENT_START
The name of the language-specific property for characters used to start a line comment. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
deinstall()
Disassociates this instance from a specific document. 
 | 
BraceProvider | 
getBraceProvider()
Fetches the  
BraceProvider for performing brace matching for this document. | 
BasicDocument | 
getDocument()
Fetches the document associated with this  
LanguageSupport instance. | 
DocumentRenderer | 
getDocumentRenderer()
Fetches the  
DocumentRenderer for rendering the given document. | 
java.lang.Object | 
getProperty(java.lang.String key)
Fetch the language-specific properties. 
 | 
SmartIndentProvider | 
getSmartIndentProvider()
Fetches the  
SmartIndentProvider to use for performing smart indentation. | 
WordLocator | 
getWordLocator()
Fetches the  
WordLocator to use for locating word boundaries for word-based navigator. | 
void | 
install(BasicDocument document)
Associates this  
LanguageSupport instance with a specific document. | 
static final java.lang.String PROPERTY_LINE_COMMENT_START
BasicDocument getDocument()
LanguageSupport instance.java.lang.Object getProperty(java.lang.String key)
key - a non-null propertyvoid install(BasicDocument document)
LanguageSupport instance with a specific document. This is useful for example if there are caches maintained for this document.document - the documentvoid deinstall()
DocumentRenderer getDocumentRenderer()
DocumentRenderer for rendering the given document. Note that all implementations are required to provide a DocumentRenderer.DocumentRenderer that will be used for rendering (syntax-highlighting) the given document contentBraceProvider getBraceProvider()
BraceProvider for performing brace matching for this document.BraceProvider, or null if this language does not support brace matching.WordLocator getWordLocator()
WordLocator to use for locating word boundaries for word-based navigator. Implementations may return null to default to the natural language word locator based on the JDK's word break iterator.WordLocator, or null to use the default word locatorSmartIndentProvider getSmartIndentProvider()
SmartIndentProvider to use for performing smart indentation.SmartIndentProvider for this language