import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.source.ICharacterPairMatcher;
/**
* Helper class for match pairs of characters.
*/
-public class PHPPairMatcher {
+public class PHPPairMatcher implements ICharacterPairMatcher {
public static final int LEFT= 1;
fPairs= pairs;
}
+ /*
+ * @see org.eclipse.jface.text.source.ICharacterPairMatcher#clear()
+ */
+ public void clear() {
+ if (fReader != null) {
+ try {
+ fReader.close();
+ } catch (IOException x) {
+ // ignore
+ }
+ }
+ }
+
public IRegion match(IDocument document, int offset) {
fOffset= offset;