Package org.eclipse.m2m.atl.adt.ui.text
Class AtlPairMatcher
java.lang.Object
org.eclipse.m2m.atl.adt.ui.text.AtlPairMatcher
- All Implemented Interfaces:
org.eclipse.jface.text.source.ICharacterPairMatcher
public class AtlPairMatcher
extends Object
implements org.eclipse.jface.text.source.ICharacterPairMatcher
This class will help for matching pairs of characters.
-
Field Summary
Fields inherited from interface org.eclipse.jface.text.source.ICharacterPairMatcher
LEFT, RIGHT -
Constructor Summary
ConstructorsConstructorDescriptionAtlPairMatcher(char[] pairs) Creates a new instance of the ATL pair matcher.AtlPairMatcher(String[] pairs) Creates a new instance of the ATL pair matcher. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voiddispose()intchargetMatchingPair(char singleton) org.eclipse.jface.text.IRegionmatch(org.eclipse.jface.text.IDocument iDocument, int i) protected booleanintsearchForClosingPeer(int offset, int openingPeer, int closingPeer, org.eclipse.jface.text.IDocument document) intsearchForOpeningPeer(int offset, int openingPeer, int closingPeer, org.eclipse.jface.text.IDocument document)
-
Constructor Details
-
AtlPairMatcher
public AtlPairMatcher(char[] pairs) Creates a new instance of the ATL pair matcher.- Parameters:
pairs- the character to match.
-
AtlPairMatcher
Creates a new instance of the ATL pair matcher.- Parameters:
pairs- the character to match.
-
-
Method Details
-
clear
public void clear()- Specified by:
clearin interfaceorg.eclipse.jface.text.source.ICharacterPairMatcher- See Also:
-
dispose
public void dispose()- Specified by:
disposein interfaceorg.eclipse.jface.text.source.ICharacterPairMatcher- See Also:
-
getAnchor
public int getAnchor()- Specified by:
getAnchorin interfaceorg.eclipse.jface.text.source.ICharacterPairMatcher- See Also:
-
getMatchingPair
public char getMatchingPair(char singleton) -
match
public org.eclipse.jface.text.IRegion match(org.eclipse.jface.text.IDocument iDocument, int i) - Specified by:
matchin interfaceorg.eclipse.jface.text.source.ICharacterPairMatcher- See Also:
-
matchPairsAt
protected boolean matchPairsAt() -
searchForClosingPeer
public int searchForClosingPeer(int offset, int openingPeer, int closingPeer, org.eclipse.jface.text.IDocument document) throws IOException - Throws:
IOException
-
searchForOpeningPeer
public int searchForOpeningPeer(int offset, int openingPeer, int closingPeer, org.eclipse.jface.text.IDocument document) throws IOException - Throws:
IOException
-