Changes:
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / text / PHPPairMatcher.java
index 97a0edd..f66faaf 100644 (file)
@@ -11,11 +11,12 @@ import org.eclipse.jface.text.BadLocationException;
 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;
@@ -37,6 +38,19 @@ public class PHPPairMatcher {
                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;