public interface ICharacterPairMatcher
In order to provide backward compatibility for clients of ICharacterPairMatcher
,
extension interfaces are used to provide a means of evolution. The following extension interface
exists:
ICharacterPairMatcherExtension
since version 3.8
introducing the concept of matching peer character and enclosing peer characters for a given
selection.
Clients may implement this interface and its extension interface or use the default
implementation provided by DefaultCharacterPairMatcher
.
ICharacterPairMatcherExtension
Modifier and Type | Field and Description |
---|---|
static int |
LEFT
Indicates the anchor value "left".
|
static int |
RIGHT
Indicates the anchor value "right".
|
Modifier and Type | Method and Description |
---|---|
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 document,
int offset)
Starting at the given offset, the matcher chooses a character close to this offset.
|
static final int RIGHT
static final int LEFT
void dispose()
void clear()
match
method.IRegion match(IDocument document, int offset)
Since version 3.8 the recommended way for finding matching peers is to use
ICharacterPairMatcherExtension.match(IDocument, int, int)
.
document
- the document to work onoffset
- the start offsetnull
if there is no
peer character.int getAnchor()
RIGHT
or LEFT
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.