|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.text.source.DefaultCharacterPairMatcher
A character pair matcher that matches a specified set of character pairs against each other. Only characters that occur in the same partitioning are matched.
Field Summary |
---|
Fields inherited from interface org.eclipse.jface.text.source.ICharacterPairMatcher |
---|
LEFT, RIGHT |
Constructor Summary | |
---|---|
DefaultCharacterPairMatcher(char[] chars)
Creates a new character pair matcher that matches characters within the default partitioning. |
|
DefaultCharacterPairMatcher(char[] chars,
String partitioning)
Creates a new character pair matcher that matches the specified characters within the specified partitioning. |
Method Summary | |
---|---|
void |
clear()
Clears this pair matcher. |
void |
dispose()
Disposes this pair matcher. |
int |
getAnchor()
Returns the anchor for the region of the matching peer characters. |
IRegion |
match(IDocument doc,
int offset)
Starting at the given offset, the matcher chooses a character close to this offset. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultCharacterPairMatcher(char[] chars, String partitioning)
{ start, end, start, end, ..., start, end }For instance:
char[] chars = new char[] {'(', ')', '{', '}', '[', ']'}; new SimpleCharacterPairMatcher(chars, ...);
chars
- a list of characterspartitioning
- the partitioning to match withinpublic DefaultCharacterPairMatcher(char[] chars)
{ start, end, start, end, ..., start, end }For instance:
char[] chars = new char[] {'(', ')', '{', '}', '[', ']'}; new SimpleCharacterPairMatcher(chars);
chars
- a list of charactersMethod Detail |
public IRegion match(IDocument doc, int offset)
ICharacterPairMatcher
null
if there is no peer character.
match
in interface ICharacterPairMatcher
doc
- the document to work onoffset
- the start offset
public int getAnchor()
ICharacterPairMatcher
getAnchor
in interface ICharacterPairMatcher
RIGHT
or LEFT
public void dispose()
ICharacterPairMatcher
dispose
in interface ICharacterPairMatcher
public void clear()
ICharacterPairMatcher
match
method.
clear
in interface ICharacterPairMatcher
|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.