|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.javatools.editor.language.AbstractLanguageSupport
An AbstractLanguageSupport
is the base class for all
LanguageSupports provided with this editor component. It takes
care of implementing common functionality.
Field Summary |
Fields inherited from interface oracle.javatools.editor.language.LanguageSupport |
PROPERTY_LINE_COMMENT_START |
Constructor Summary | |
AbstractLanguageSupport()
|
Method Summary | |
protected BraceProvider |
createBraceProvider()
Creates a new BraceProvider for performing brace
matching for this document. |
protected abstract DocumentRenderer |
createDocumentRenderer()
Creates the DocumentRenderer for rendering the
given document. |
protected SmartIndentProvider |
createSmartIndentProvider()
Creates a new SmartIndentProvider for performing
smart indentation for this language. |
protected WordLocator |
createWordLocator()
Creates a new WordLocator for defining word boundaries
that make sense for a given language. |
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)
Gets language-specific properties. |
protected java.lang.Object |
getPropertyImpl(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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractLanguageSupport()
Method Detail |
public void install(BasicDocument document)
LanguageSupport
instance with a
specific document. This is useful for example if there are
caches maintained for this document.
install
in interface LanguageSupport
document
- the documentpublic void deinstall()
deinstall
in interface LanguageSupport
public final BasicDocument getDocument()
LanguageSupport
instance.
getDocument
in interface LanguageSupport
public final java.lang.Object getProperty(java.lang.String key)
getProperty
in interface LanguageSupport
key
- a non-null property
protected java.lang.Object getPropertyImpl(java.lang.String key)
key
- a non-null property
public final DocumentRenderer getDocumentRenderer()
DocumentRenderer
for rendering the
given document. Note that all implementations are required to
provide a DocumentRenderer
.
getDocumentRenderer
in interface LanguageSupport
DocumentRenderer
that will be used for
rendering (syntax-highlighting) the given document contentpublic final BraceProvider getBraceProvider()
BraceProvider
for performing brace
matching for this document.
getBraceProvider
in interface LanguageSupport
BraceProvider
for brace matching, or
null if brace matching is not supported for this
language.public WordLocator getWordLocator()
WordLocator
to use for locating word
boundaries for word-based navigator. Implementations may
override this to use their own custom word locator instead of the
default one based on the natural language word locator based on
the JDK's word break iterator.
getWordLocator
in interface LanguageSupport
WordLocator
public SmartIndentProvider getSmartIndentProvider()
SmartIndentProvider
to use for
performing smart indentation.
getSmartIndentProvider
in interface LanguageSupport
SmartIndentProvider
for this languageprotected abstract DocumentRenderer createDocumentRenderer()
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 contentprotected BraceProvider createBraceProvider()
BraceProvider
for performing brace
matching for this document.
BraceProvider
for brace matching, or
null if brace matching is not supported for this
language.protected WordLocator createWordLocator()
WordLocator
for defining word boundaries
that make sense for a given language. The default one uses the JDK's
break iterator for natural word boundaries.
WordLocator
for locating word boundariesprotected SmartIndentProvider createSmartIndentProvider()
SmartIndentProvider
for performing
smart indentation for this language.
SmartIndentProvider
, or null if this
language does not support smart indentation
|
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.