|
org.netbeans.modules.editor.bracesmatching/0 1.10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.spi.editor.bracesmatching.MatcherContext
public final class MatcherContext
An immutable context for a BracesMatcher. This context is created by the
editor infrastructure when it needs to create a matcher by using a registered
BracesMatcherFactory. The context provides a matcher with
information essential to perform the search.
| Method Summary | |
|---|---|
Document |
getDocument()
Gets a document that should be searched for matching areas. |
int |
getLimitOffset()
Gets an offset in a document towards which the search should go. |
int |
getSearchLookahead()
Gets the number of characters to search through when looking for an original area. |
int |
getSearchOffset()
Gets an offset in a document where searching should start. |
boolean |
isSearchingBackward()
Gets the direction to search in for an original area. |
static boolean |
isTaskCanceled()
Determines if a braces matching task was canceled. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public Document getDocument()
public int getSearchOffset()
public boolean isSearchingBackward()
true to search backward towards the beginning of
a document or false to search forward towards the end of
a document.public int getLimitOffset()
searchOffset ± searchLookahead depending on
the search direction.
searchOffset ± searchLookahead.public int getSearchLookahead()
public static boolean isTaskCanceled()
IMPORTANT: This method may only
be called from the thread running a braces matching task, ie. the one
that calls your BracesMatcher's findOrigin and
findMatches methods. Calling this method from a different thread
will assert and fail.
true if the task was canceled, false otherwise
|
org.netbeans.modules.editor.bracesmatching/0 1.10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||