From d6e83682d2c4418900773c9b4b67405689fd0ca7 Mon Sep 17 00:00:00 2001 From: khartlage Date: Mon, 31 Mar 2003 20:15:22 +0000 Subject: [PATCH] Improved PHPCodeReader for "Go to Matching Bracket" Action --- .../phpdt/internal/ui/text/PHPCodeReader.java | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/PHPCodeReader.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/PHPCodeReader.java index 41db8c4..a989296 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/PHPCodeReader.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/PHPCodeReader.java @@ -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; + } } } } -- 1.7.1