Rename HTML editor to Smarty editor
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / text / JavaHeuristicScanner.java
index ebeef70..d7ef909 100644 (file)
@@ -12,6 +12,8 @@ package net.sourceforge.phpdt.internal.ui.text;
 
 import java.util.Arrays;
 
+import net.sourceforge.phpdt.internal.compiler.parser.Scanner;
+
 import org.eclipse.jface.text.Assert;
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
@@ -75,7 +77,7 @@ public class JavaHeuristicScanner implements Symbols {
         */
        private static class NonWhitespace implements StopCondition {
                /*
-                * @see org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner.StopCondition#stop(char)
+                * @see net.sourceforge.phpdt.internal.ui.text.JavaHeuristicScanner.StopCondition#stop(char)
                 */
                public boolean stop(char ch, int position, boolean forward) {
                        return !Character.isWhitespace(ch);
@@ -89,7 +91,7 @@ public class JavaHeuristicScanner implements Symbols {
         */
        private class NonWhitespaceDefaultPartition extends NonWhitespace {
                /*
-                * @see org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner.StopCondition#stop(char)
+                * @see net.sourceforge.phpdt.internal.ui.text.JavaHeuristicScanner.StopCondition#stop(char)
                 */
                public boolean stop(char ch, int position, boolean forward) {
                        return super.stop(ch, position, true) && isDefaultPartition(position);
@@ -97,14 +99,14 @@ public class JavaHeuristicScanner implements Symbols {
        }
        
        /**
-        * Stops upon a non-java identifier (as defined by {@link Character#isJavaIdentifierPart(char)}) character. 
+        * Stops upon a non-java identifier (as defined by {@link Scanner#isPHPIdentifierPart(char)}) character. 
         */
        private static class NonJavaIdentifierPart implements StopCondition {
                /*
-                * @see org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner.StopCondition#stop(char)
+                * @see net.sourceforge.phpdt.internal.ui.text.JavaHeuristicScanner.StopCondition#stop(char)
                 */
                public boolean stop(char ch, int position, boolean forward) {
-                       return !Character.isJavaIdentifierPart(ch);
+                       return !Scanner.isPHPIdentifierPart(ch);
                }
        }
        
@@ -115,7 +117,7 @@ public class JavaHeuristicScanner implements Symbols {
         */
        private class NonJavaIdentifierPartDefaultPartition extends NonJavaIdentifierPart {
                /*
-                * @see org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner.StopCondition#stop(char)
+                * @see net.sourceforge.phpdt.internal.ui.text.JavaHeuristicScanner.StopCondition#stop(char)
                 */
                public boolean stop(char ch, int position, boolean forward) {
                        return super.stop(ch, position, true) || !isDefaultPartition(position);
@@ -148,7 +150,7 @@ public class JavaHeuristicScanner implements Symbols {
                }
                
                /*
-                * @see org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner.StopCondition#stop(char, int)
+                * @see net.sourceforge.phpdt.internal.ui.text.JavaHeuristicScanner.StopCondition#stop(char, int)
                 */
                public boolean stop(char ch, int position, boolean forward) {
                        return Arrays.binarySearch(fChars, ch) >= 0 && isDefaultPartition(position);
@@ -180,7 +182,7 @@ public class JavaHeuristicScanner implements Symbols {
                }
 
                /*
-                * @see org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner.StopCondition#stop(char, int)
+                * @see net.sourceforge.phpdt.internal.ui.text.JavaHeuristicScanner.StopCondition#stop(char, int)
                 */
                public boolean stop(char ch, int position, boolean forward) {
                        
@@ -332,7 +334,7 @@ public class JavaHeuristicScanner implements Symbols {
                }
                
                // else
-               if (Character.isJavaIdentifierPart(fChar)) {
+               if (Scanner.isPHPIdentifierPart(fChar)) {
                        // assume an ident or keyword
                        int from= pos, to;
                        pos= scanForward(pos + 1, bound, fNonIdent);
@@ -400,7 +402,7 @@ public class JavaHeuristicScanner implements Symbols {
                }
                
                // else
-               if (Character.isJavaIdentifierPart(fChar)) {
+               if (Scanner.isPHPIdentifierPart(fChar)) {
                        // assume an ident or keyword
                        int from, to= pos + 1;
                        pos= scanBackward(pos - 1, bound, fNonIdent);