|
Eclipse Platform 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A character pair matcher finds to a character at a certain document offset the matching peer character. It is the matchers responsibility to define the concepts of "matching" and "peer". The matching process starts at a given offset. Starting of this offset, the matcher chooses a character close to this offset. The anchor defines whether the chosen character is left or right of the initial offset. The matcher then searches for the matching peer character of the chosen character and if it finds one, delivers the minimal region of the document that contains both characters.
Field Summary | |
static int |
LEFT
Indicates the anchor value "left". |
static int |
RIGHT
Indicates the anchor value "right". |
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 iDocument,
int i)
Starting at the given offset, the matcher chooses a character close to this offset. |
Field Detail |
public static final int RIGHT
public static final int LEFT
Method Detail |
public void dispose()
public void clear()
match
method.public IRegion match(IDocument iDocument, int i)
null
if there is no peer character.iDocument
- the document to work oni
- the start offsetpublic int getAnchor()
RIGHT
or LEFT
|
Eclipse Platform 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |