059f56ab6c422455f5818e6771a275bed629d8ca
[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 org.eclipse.jface.text.rules.IWordDetector;
16
17 /**
18  * A Java aware word detector.
19  */
20 public class HTMLWordDetector implements IWordDetector {
21
22         /* (non-Javadoc)
23          * Method declared on IWordDetector.
24          */
25         public boolean isWordPart(char character) {
26                 return Character.isJavaIdentifierPart(character)||(character=='/')||(character=='>');
27         }
28         
29         /* (non-Javadoc)
30          * Method declared on IWordDetector.
31          */
32         public boolean isWordStart(char character) {
33                 return character=='<';
34         }
35 }