Improved PHPCodeReader for "Go to Matching Bracket" Action
authorkhartlage <khartlage>
Mon, 31 Mar 2003 20:15:22 +0000 (20:15 +0000)
committerkhartlage <khartlage>
Mon, 31 Mar 2003 20:15:22 +0000 (20:15 +0000)
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/PHPCodeReader.java

index 41db8c4..a989296 100644 (file)
@@ -119,6 +119,15 @@ public class PHPCodeReader extends SingleCharReader {
                        char current= fDocument.getChar(fOffset++);
                        
                        switch (current) {
+        case '#':
+                                       
+          if (fSkipComments && fOffset < fEnd) {
+              gotoLineEnd();
+              continue;
+          }
+                                       
+          return current;
+          
                                case '/':
                                        
                                        if (fSkipComments && fOffset < fEnd) {
@@ -166,6 +175,10 @@ public class PHPCodeReader extends SingleCharReader {
                                        fOffset= offset;
                                        return;
                                }
+        if (current == '#' && fCachedLineOffset <= offset) {
+          fOffset= offset;
+          return;
+        }
                        }
                }
        }