- All Known Implementing Classes:
In order to provide backward compatibility for clients of
extension interfaces are used to provide a means of evolution. The following extension interface
ICharacterPairMatcherExtensionsince 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
- See Also:
Method SummaryModifier and TypeMethodDescription
clear()Clears this pair matcher.
dispose()Disposes this pair matcher.
intReturns the anchor for the region of the matching peer characters.Starting at the given offset, the matcher chooses a character close to this offset.
disposevoid dispose()Disposes this pair matcher.
clearvoid clear()Clears this pair matcher. I.e. the matcher throws away all state it might remember and prepares itself for a new call of the
matchStarting at the given offset, the matcher chooses a character close to this offset. The matcher then searches for the matching peer character of the chosen character and if it finds one, returns the minimal region of the document that contains both characters.
Since version 3.8 the recommended way for finding matching peers is to use
ICharacterPairMatcherExtension.match(IDocument, int, int).
document- the document to work on
offset- the start offset
- the minimal region containing the peer characters or
nullif there is no peer character.
getAnchorint getAnchor()Returns the anchor for the region of the matching peer characters. The anchor says whether the character that has been chosen to search for its peer character has been the left or the right character of the pair.