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