6aada839b9fae61c8b94b305d9ff7b51141e417b
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / util / HTMLWordDetector.java
1 package net.sourceforge.phpeclipse.phpeditor.util;
2
3 /**********************************************************************
4 Copyright (c) 2000, 2002 IBM Corp. and others.
5 All rights reserved. This program and the accompanying materials
6 are made available under the terms of the Common Public License v1.0
7 which accompanies this distribution, and is available at
8 http://www.eclipse.org/legal/cpl-v10.html
9
10 Contributors:
11     IBM Corporation - Initial implementation
12     Klaus Hartlage - www.eclipseproject.de
13 **********************************************************************/
14
15 import net.sourceforge.phpdt.internal.compiler.parser.Scanner;
16
17 import org.eclipse.jface.text.rules.IWordDetector;
18
19 /**
20  * A Java aware word detector.
21  */
22 public class HTMLWordDetector implements IWordDetector {
23
24         /* (non-Javadoc)
25          * Method declared on IWordDetector.
26          */
27         public boolean isWordPart(char character) {
28                 return Scanner.isPHPIdentifierPart(character)||(character=='/')||(character=='>');
29         }
30         
31         /* (non-Javadoc)
32          * Method declared on IWordDetector.
33          */
34         public boolean isWordStart(char character) {
35                 return character=='<';
36         }
37 }