KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > text > rules > IRule


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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  *******************************************************************************/

11 package org.eclipse.jface.text.rules;
12
13
14 /**
15  * Defines the interface for a rule used in the
16  * scanning of text for the purpose of document
17  * partitioning or text styling.
18  *
19  * @see ICharacterScanner
20  */

21 public interface IRule {
22
23     /**
24      * Evaluates the rule by examining the characters available from
25      * the provided character scanner. The token returned by this rule
26      * returns <code>true</code> when calling <code>isUndefined</code>,
27      * if the text that the rule investigated does not match the rule's requirements
28      *
29      * @param scanner the character scanner to be used by this rule
30      * @return the token computed by the rule
31      */

32     IToken evaluate(ICharacterScanner scanner);
33 }
34
Popular Tags