|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.text.source.DefaultCharacterPairMatcher
public class 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,
java.lang.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,
java.lang.String partitioning)
{ start, end, start, end, ..., start, end }For instance:
char[] chars = new char[] {'(', ')', '{', '}', '[', ']'};
new DefaultCharacterPairMatcher(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 DefaultCharacterPairMatcher(chars);
chars - a list of characters| Method Detail |
|---|
public IRegion match(IDocument doc,
int offset)
ICharacterPairMatchernull if there is no peer character.
match in interface ICharacterPairMatcherdoc - the document to work onoffset - the start offset
public int getAnchor()
ICharacterPairMatcher
getAnchor in interface ICharacterPairMatcherRIGHT or LEFTpublic void dispose()
ICharacterPairMatcher
dispose in interface ICharacterPairMatcherpublic void clear()
ICharacterPairMatchermatch
method.
clear in interface ICharacterPairMatcher
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.