import net.sourceforge.phpeclipse.phpeditor.util.HTMLWordDetector;
import net.sourceforge.phpeclipse.phpeditor.util.PHPColorProvider;
import net.sourceforge.phpeclipse.phpeditor.util.PHPWhitespaceDetector;
-import org.eclipse.jface.text.BadLocationException;
+
import org.eclipse.jface.text.TextAttribute;
import org.eclipse.jface.text.rules.ICharacterScanner;
import org.eclipse.jface.text.rules.IRule;
import org.eclipse.jface.text.rules.WordRule;
/**
- * A Java code scanner.
+ * A HTML code scanner.
*/
public class HTMLCodeScanner extends RuleBasedScanner {
if (c == '/' && (fBuffer.length() > 2) ) {
break;
}
- } while (c != scanner.EOF && fDetector.isWordPart((char) c));
+ } while (c != ICharacterScanner.EOF && fDetector.isWordPart((char) c));
scanner.unread();
if (tagBegin) {
public HTMLCodeScanner(PHPColorProvider provider) {
keyword = new Token(new TextAttribute(provider.getColor(PHPColorProvider.KEYWORD)));
- IToken type = new Token(new TextAttribute(provider.getColor(PHPColorProvider.TYPE)));
+ IToken type = new Token(new TextAttribute(provider.getColor(PHPColorProvider.FUNCTION_NAME)));
IToken string = new Token(new TextAttribute(provider.getColor(PHPColorProvider.STRING)));
IToken comment = new Token(new TextAttribute(provider.getColor(PHPColorProvider.SINGLE_LINE_COMMENT)));
IToken multi_comment = new Token(new TextAttribute(provider.getColor(PHPColorProvider.MULTI_LINE_COMMENT)));