public interface PairedBraceMatcher
SyntaxHighlighter
and return the correct
lexer from getHighlightingLexer()
.Modifier and Type | Method and Description |
---|---|
int |
getCodeConstructStart(PsiFile file,
int openingBraceOffset)
Returns the start offset of the code construct which owns the opening structural brace at the specified offset.
|
BracePair [] |
getPairs()
Returns the array of definitions for brace pairs that need to be matched when
editing code in the language.
|
boolean |
isPairedBracesAllowedBeforeType(IElementType lbraceType,
IElementType contextType)
Returns
true if paired rbrace should be inserted after lbrace of given type when lbrace is encountered before contextType token. |
BracePair [] getPairs()
boolean isPairedBracesAllowedBeforeType(IElementType lbraceType, IElementType contextType)
true
if paired rbrace should be inserted after lbrace of given type when lbrace is encountered before contextType token.
It is safe to always return true
, then paired brace will be inserted anyway.lbraceType
- lbrace for which information is queriedcontextType
- token type that follows lbraceint getCodeConstructStart(PsiFile file, int openingBraceOffset)
file
- the file in which brace matching is performed.openingBraceOffset
- the offset of an opening structural brace.