Mercurial > projects > dwt2
comparison org.eclipse.jface.text/src/org/eclipse/jface/text/rules/IRule.d @ 12:bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 14 Mar 2009 18:23:29 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
11:43904fec5dca | 12:bc29606a740c |
---|---|
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 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | |
13 module org.eclipse.jface.text.rules.IRule; | |
14 | |
15 import org.eclipse.jface.text.rules.FastPartitioner; // packageimport | |
16 import org.eclipse.jface.text.rules.ITokenScanner; // packageimport | |
17 import org.eclipse.jface.text.rules.Token; // packageimport | |
18 import org.eclipse.jface.text.rules.RuleBasedScanner; // packageimport | |
19 import org.eclipse.jface.text.rules.EndOfLineRule; // packageimport | |
20 import org.eclipse.jface.text.rules.WordRule; // packageimport | |
21 import org.eclipse.jface.text.rules.WhitespaceRule; // packageimport | |
22 import org.eclipse.jface.text.rules.WordPatternRule; // packageimport | |
23 import org.eclipse.jface.text.rules.IPredicateRule; // packageimport | |
24 import org.eclipse.jface.text.rules.DefaultPartitioner; // packageimport | |
25 import org.eclipse.jface.text.rules.NumberRule; // packageimport | |
26 import org.eclipse.jface.text.rules.SingleLineRule; // packageimport | |
27 import org.eclipse.jface.text.rules.PatternRule; // packageimport | |
28 import org.eclipse.jface.text.rules.RuleBasedDamagerRepairer; // packageimport | |
29 import org.eclipse.jface.text.rules.ICharacterScanner; // packageimport | |
30 import org.eclipse.jface.text.rules.DefaultDamagerRepairer; // packageimport | |
31 import org.eclipse.jface.text.rules.IToken; // packageimport | |
32 import org.eclipse.jface.text.rules.IPartitionTokenScanner; // packageimport | |
33 import org.eclipse.jface.text.rules.MultiLineRule; // packageimport | |
34 import org.eclipse.jface.text.rules.RuleBasedPartitioner; // packageimport | |
35 import org.eclipse.jface.text.rules.RuleBasedPartitionScanner; // packageimport | |
36 import org.eclipse.jface.text.rules.BufferedRuleBasedScanner; // packageimport | |
37 import org.eclipse.jface.text.rules.IWhitespaceDetector; // packageimport | |
38 | |
39 | |
40 import java.lang.all; | |
41 | |
42 | |
43 /** | |
44 * Defines the interface for a rule used in the | |
45 * scanning of text for the purpose of document | |
46 * partitioning or text styling. | |
47 * | |
48 * @see ICharacterScanner | |
49 */ | |
50 public interface IRule { | |
51 | |
52 /** | |
53 * Evaluates the rule by examining the characters available from | |
54 * the provided character scanner. The token returned by this rule | |
55 * returns <code>true</code> when calling <code>isUndefined</code>, | |
56 * if the text that the rule investigated does not match the rule's requirements | |
57 * | |
58 * @param scanner the character scanner to be used by this rule | |
59 * @return the token computed by the rule | |
60 */ | |
61 IToken evaluate(ICharacterScanner scanner); | |
62 } |