|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The 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
Field Summary | |
static java.lang.String |
PROPERTY_LINE_COMMENT_START
The name of the language-specific property for characters used to start a line comment. |
Method Summary | |
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. |
Field Detail |
public static final java.lang.String PROPERTY_LINE_COMMENT_START
Method Detail |
public BasicDocument getDocument()
LanguageSupport
instance.
public java.lang.Object getProperty(java.lang.String key)
key
- a non-null property
public void install(BasicDocument document)
LanguageSupport
instance with a
specific document. This is useful for example if there are
caches maintained for this document.
document
- the documentpublic void deinstall()
public 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 contentpublic BraceProvider getBraceProvider()
BraceProvider
for performing brace
matching for this document.
BraceProvider
, or null if this language
does not support brace matching.public 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 locatorpublic SmartIndentProvider getSmartIndentProvider()
SmartIndentProvider
to use for
performing smart indentation.
SmartIndentProvider
for this language
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.