|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.editor.language.AbstractBraceProvider
public abstract class AbstractBraceProvider
The GenericBraceProvider
implementation provides brace matching support for "generic" languages that implement the generic Language
API to describe the language.
BraceProvider
, BraceMatchingPlugin
Field Summary | |
---|---|
protected int[] |
braceArray Stores the array containing start and end offsets of brace tokens, as well as brace indexes. |
protected int |
braceCount Stores the count of brace tokens in the buffer. |
Fields inherited from interface oracle.javatools.editor.language.BraceProvider |
---|
BALANCED_MATCH, MISMATCH, UNBALANCED_MATCH |
Constructor Summary | |
---|---|
AbstractBraceProvider() |
Method Summary | |
---|---|
protected int[] |
expandBraceArray(int[] braceArray) Utility routine to expand the brace array. |
protected void |
fillBraceArray() Utility routine to fill the contents of the brace array. |
int |
findMatchingBrace(int braceType, NumberRange braceLocation, NumberRange matchingLocation) Finds the brace matching the given brace identified by isPartOfBrace(). |
protected abstract java.lang.String |
getBraceCharacters() Gets a string of all brace characters. |
protected abstract BraceHelper |
getBraceHelper() Gets the BraceHelper that gives information about the braces in this file. |
protected abstract Lexer |
getLexer() Gets (or creates) the lexer we'll use for lexing. |
protected abstract TextBuffer |
getTextBuffer() Gets the TextBuffer we are working on. |
protected int |
guessBraceCount(int length) Utility routine to guess the brace count for a given size file. |
protected abstract boolean |
isBraceToken(int token) True if the token is a brace token (open or close). |
int |
isPartOfBrace(int offset, NumberRange braceLocation) Determines whether the character at the given offset is considered a brace or part of a brace in this language. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int[] braceArray
protected int braceCount
Constructor Detail |
---|
public AbstractBraceProvider()
Method Detail |
---|
protected abstract TextBuffer getTextBuffer()
protected abstract BraceHelper getBraceHelper()
protected abstract Lexer getLexer()
protected abstract boolean isBraceToken(int token)
token
- A token value returned by the lexer during lexing.protected abstract java.lang.String getBraceCharacters()
public int isPartOfBrace(int offset, NumberRange braceLocation)
NumberRange
object passed in by the caller is filled in by this routine to indicate the start and end of the brace at the given offset provided. This routine returns a language-specific token type corresponding to the given brace at the offset, or -1 (Lexer.NOT_FOUND) if the offset is not part of a brace.isPartOfBrace
in interface BraceProvider
offset
- the offset in the document associated with the specific LanguageSupport to check if it is a bracebraceLocation
- an out parameter to pass start and end offset information to the caller if the provided brace offset is indeed part of a bracepublic int findMatchingBrace(int braceType, NumberRange braceLocation, NumberRange matchingLocation)
findMatchingBrace
in interface BraceProvider
braceType
- the language-specific token type returned by isPartOfBrace().braceLocation
- the brace location filled in by isPartOfBrace()matchingLocation
- an out parameter to pass start and end offset information to the caller if a matching brace was foundprotected int guessBraceCount(int length)
length
- the length of the fileprotected int[] expandBraceArray(int[] braceArray)
braceArray
- the old brace arrayprotected void fillBraceArray() throws java.lang.InterruptedException
java.lang.InterruptedException
- if interrupted when filling the array
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |