public class GenericBraceProvider extends AbstractBraceProvider implements BraceProvider
GenericBraceProvider
implementation provides brace
matching support for "generic" languages that implement the
generic Language
API to describe the language.BraceProvider
,
BraceMatchingPlugin
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
braceCharacters
String containing all possible brace characters for this language.
|
protected BraceHelper |
braceHelper
The brace helper for the language implementation.
|
protected GenericLexer |
lexer
The lexer to use for the language.
|
protected LexerToken |
lexerToken
The token to use for lexing.
|
protected TextBuffer |
textBuffer
The TextBuffer instance used by this GenericBraceProvider.
|
braceArray, braceCount
BALANCED_MATCH, MISMATCH, UNBALANCED_MATCH
Constructor and Description |
---|
GenericBraceProvider(LanguageSupport support,
Language language)
Constructs a new GenericBraceProvider associated with the given
LanguageSupport and language instance.
|
GenericBraceProvider(LanguageSupport support,
Language language,
GenericLexer lexerToUse)
Constructs a new GenericBraceProvider associated with the given
LanguageSupport and language instance.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getBraceCharacters()
Gets a string of all brace characters.
|
protected BraceHelper |
getBraceHelper()
Gets the BraceHelper that gives information about the braces in this
file.
|
protected Lexer |
getLexer()
Gets (or creates) the lexer we'll use for lexing.
|
protected TextBuffer |
getTextBuffer()
Gets the TextBuffer we are working on.
|
protected boolean |
isBraceToken(int token)
True if the token is a brace token (open or close).
|
expandBraceArray, fillBraceArray, findMatchingBrace, guessBraceCount, isPartOfBrace
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
findMatchingBrace, isPartOfBrace
protected TextBuffer textBuffer
protected BraceHelper braceHelper
protected GenericLexer lexer
protected LexerToken lexerToken
protected java.lang.String braceCharacters
public GenericBraceProvider(LanguageSupport support, Language language)
GenericLexer
instance to use.support
- the language supportlanguage
- the language definitionpublic GenericBraceProvider(LanguageSupport support, Language language, GenericLexer lexerToUse)
GenericLexer
implementation.support
- the language supportlanguage
- the language definitionlexerToUse
- the lexer to useprotected TextBuffer getTextBuffer()
AbstractBraceProvider
getTextBuffer
in class AbstractBraceProvider
protected BraceHelper getBraceHelper()
AbstractBraceProvider
getBraceHelper
in class AbstractBraceProvider
protected Lexer getLexer()
AbstractBraceProvider
getLexer
in class AbstractBraceProvider
protected boolean isBraceToken(int token)
AbstractBraceProvider
isBraceToken
in class AbstractBraceProvider
token
- A token value returned by the lexer during lexing.protected java.lang.String getBraceCharacters()
AbstractBraceProvider
getBraceCharacters
in class AbstractBraceProvider