129
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2000, 2005 IBM Corporation and others.
|
|
3 * All rights reserved. This program and the accompanying materials
|
|
4 * are made available under the terms of the Eclipse Public License v1.0
|
|
5 * which accompanies this distribution, and is available at
|
|
6 * http://www.eclipse.org/legal/epl-v10.html
|
|
7 *
|
|
8 * Contributors:
|
|
9 * IBM Corporation - initial API and implementation
|
|
10 * Port to the D programming language:
|
|
11 * Frank Benoit <benoit@tionex.de>
|
|
12 *******************************************************************************/
|
|
13 module dwtx.jface.text.rules.IWordDetector;
|
|
14
|
|
15 import dwt.dwthelper.utils;
|
|
16
|
|
17
|
|
18 /**
|
|
19 * Defines the interface by which <code>WordRule</code>
|
|
20 * determines whether a given character is valid as part
|
|
21 * of a word in the current context.
|
|
22 */
|
|
23 public interface IWordDetector {
|
|
24
|
|
25 /**
|
|
26 * Returns whether the specified character is
|
|
27 * valid as the first character in a word.
|
|
28 *
|
|
29 * @param c the character to be checked
|
|
30 * @return <code>true</code> is a valid first character in a word, <code>false</code> otherwise
|
|
31 */
|
|
32 bool isWordStart(char c);
|
|
33
|
|
34 /**
|
|
35 * Returns whether the specified character is
|
|
36 * valid as a subsequent character in a word.
|
|
37 *
|
|
38 * @param c the character to be checked
|
|
39 * @return <code>true</code> if the character is a valid word part, <code>false</code> otherwise
|
|
40 */
|
|
41 bool isWordPart(char c);
|
|
42 }
|