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;
*/
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);
*/
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);
}
/**
- * 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);
}
}
*/
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);
}
/*
- * @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);
}
/*
- * @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) {
}
// else
- if (Character.isJavaIdentifierPart(fChar)) {
+ if (Scanner.isPHPIdentifierPart(fChar)) {
// assume an ident or keyword
int from= pos, to;
pos= scanForward(pos + 1, bound, fNonIdent);
}
// 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);