// StringBuffer identifier = new StringBuffer();
// while (i < textLength) {
// c = text.charAt(i++);
- // if (Character.isJavaIdentifierPart(c) || (c == '$')) {
+ // if (Scanner.isPHPIdentifierPart(c) || (c == '$')) {
// identifier.append(c);
// } else if ((i == firstIndex + 1) && (c == '$')) {
// identifier.append(c);
// identifier.append((char) c);
// try {
// while ((c = iStream.read()) != (-1)) {
- // if (Character.isJavaIdentifierPart((char) c)) {
+ // if (Scanner.isPHPIdentifierPart((char) c)) {
// identifier.append((char) c);
// // } else if ((i == 0) && (c == '$')) {
// // identifier.append((char)c);
**********************************************************************/
package net.sourceforge.phpeclipse.phpeditor.php;
+import net.sourceforge.phpdt.internal.compiler.parser.Scanner;
+
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.swt.graphics.Point;
while (position >= 0) {
character = document.getChar(position);
- if (!Character.isJavaIdentifierPart(character))
+ if (!Scanner.isPHPIdentifierPart(character))
break;
--position;
}
package net.sourceforge.phpeclipse.phpeditor.php;
+import net.sourceforge.phpdt.internal.compiler.parser.Scanner;
+
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextDoubleClickStrategy;
while (pos >= 0) {
c = doc.getChar(pos);
- if (!Character.isJavaIdentifierPart(c) && (c != '$')) {
+ if (!Scanner.isPHPIdentifierPart(c) && (c != '$')) {
break;
}
--pos;
while (pos < length) {
c = doc.getChar(pos);
- if (!Character.isJavaIdentifierPart(c) && (c != '$'))
+ if (!Scanner.isPHPIdentifierPart(c) && (c != '$'))
break;
++pos;
}
**********************************************************************/
package net.sourceforge.phpeclipse.phpeditor.php;
+import net.sourceforge.phpdt.internal.compiler.parser.Scanner;
+
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.swt.graphics.Point;
while (position >= 0) {
character = document.getChar(position);
- if (!Character.isJavaIdentifierPart(character) && (character != '$'))
+ if (!Scanner.isPHPIdentifierPart(character) && (character != '$'))
break;
--position;
}
while (position < length) {
character = document.getChar(position);
- if (!Character.isJavaIdentifierPart(character) && (character != '$'))
+ if (!Scanner.isPHPIdentifierPart(character) && (character != '$'))
break;
++position;
}
Klaus Hartlage - www.eclipseproject.de
**********************************************************************/
+import net.sourceforge.phpdt.internal.compiler.parser.Scanner;
+
import org.eclipse.jface.text.rules.IWordDetector;
/**
* Method declared on IWordDetector.
*/
public boolean isWordPart(char character) {
- return Character.isJavaIdentifierPart(character)||(character=='/')||(character=='>');
+ return Scanner.isPHPIdentifierPart(character)||(character=='/')||(character=='>');
}
/* (non-Javadoc)
**********************************************************************/
package net.sourceforge.phpeclipse.phpeditor.util;
+import net.sourceforge.phpdt.internal.compiler.parser.Scanner;
+
import org.eclipse.jface.text.rules.IWordDetector;
/**
* Method declared on IWordDetector.
*/
public boolean isWordPart(char character) {
- return Character.isJavaIdentifierPart(character);
+ return Scanner.isPHPIdentifierPart(character);
}
/* (non-Javadoc)
* Method declared on IWordDetector.
*/
public boolean isWordStart(char character) {
- return (character=='$')||Character.isJavaIdentifierStart(character);
+ return (character=='$')||Scanner.isPHPIdentifierStart(character);
}
}