2 * Copyright (c) 2002-2004 Widespace, OU 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
9 * Igor Malinin - initial contribution
11 * $Id: NmtokenDetector.java,v 1.2 2006-10-21 23:14:13 pombredanne Exp $
14 package net.sourceforge.phpeclipse.xml.ui.internal.text;
16 import org.eclipse.jface.text.rules.IWordDetector;
19 * XML Nmtoken detector.
21 * @author Igor Malinin
23 public class NmtokenDetector implements IWordDetector {
26 * @see IWordDetector#isWordPart(char)
28 public boolean isWordPart(char ch) {
29 if (Character.isUnicodeIdentifierPart(ch)) {
43 * @see IWordDetector#isWordStart(char)
45 public boolean isWordStart(char ch) {
46 return isWordPart(ch);