Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.1.0)

E13403-02

oracle.javatools.editor.language
Class GenericBraceProvider

java.lang.Object
  extended by oracle.javatools.editor.language.AbstractBraceProvider
      extended by oracle.javatools.editor.language.GenericBraceProvider
All Implemented Interfaces:
BraceProvider

public class GenericBraceProvider
extends AbstractBraceProvider
implements BraceProvider

The GenericBraceProvider implementation provides brace matching support for "generic" languages that implement the generic Language API to describe the language.

See Also:
BraceProvider, BraceMatchingPlugin

Field Summary
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.
 
Fields inherited from class oracle.javatools.editor.language.AbstractBraceProvider
braceArray, braceCount
 
Fields inherited from interface oracle.javatools.editor.language.BraceProvider
BALANCED_MATCH, MISMATCH, UNBALANCED_MATCH
 
Constructor Summary
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.
 
Method Summary
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).
 
Methods inherited from class oracle.javatools.editor.language.AbstractBraceProvider
expandBraceArray, fillBraceArray, findMatchingBrace, guessBraceCount, isPartOfBrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.javatools.editor.language.BraceProvider
findMatchingBrace, isPartOfBrace
 

Field Detail

textBuffer

protected TextBuffer textBuffer
The TextBuffer instance used by this GenericBraceProvider.


braceHelper

protected BraceHelper braceHelper
The brace helper for the language implementation.


lexer

protected GenericLexer lexer
The lexer to use for the language.


lexerToken

protected LexerToken lexerToken
The token to use for lexing.


braceCharacters

protected java.lang.String braceCharacters
String containing all possible brace characters for this language.

Constructor Detail

GenericBraceProvider

public GenericBraceProvider(LanguageSupport support,
                            Language language)
Constructs a new GenericBraceProvider associated with the given LanguageSupport and language instance. This will create a default GenericLexer instance to use.

Parameters:
support - the language support
language - the language definition

GenericBraceProvider

public GenericBraceProvider(LanguageSupport support,
                            Language language,
                            GenericLexer lexerToUse)
Constructs a new GenericBraceProvider associated with the given LanguageSupport and language instance. This allows a given language implementation to use a modified GenericLexer implementation.

Parameters:
support - the language support
language - the language definition
lexerToUse - the lexer to use
Method Detail

getTextBuffer

protected TextBuffer getTextBuffer()
Description copied from class: AbstractBraceProvider
Gets the TextBuffer we are working on.

Specified by:
getTextBuffer in class AbstractBraceProvider

getBraceHelper

protected BraceHelper getBraceHelper()
Description copied from class: AbstractBraceProvider
Gets the BraceHelper that gives information about the braces in this file.

Specified by:
getBraceHelper in class AbstractBraceProvider

getLexer

protected Lexer getLexer()
Description copied from class: AbstractBraceProvider
Gets (or creates) the lexer we'll use for lexing.

Specified by:
getLexer in class AbstractBraceProvider

isBraceToken

protected boolean isBraceToken(int token)
Description copied from class: AbstractBraceProvider
True if the token is a brace token (open or close).

Specified by:
isBraceToken in class AbstractBraceProvider
Parameters:
token - A token value returned by the lexer during lexing.

getBraceCharacters

protected java.lang.String getBraceCharacters()
Description copied from class: AbstractBraceProvider
Gets a string of all brace characters. Used to quickly determine if the character under the current insertion point (in the text buffer) might be a brace.

Specified by:
getBraceCharacters in class AbstractBraceProvider

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.1.0)

E13403-02

Copyright © 1997, 2009, Oracle. All rights reserved.