org.eclipse.jface.text.rules
Class WhitespaceRule
java.lang.Object
|
+--org.eclipse.jface.text.rules.WhitespaceRule
- All Implemented Interfaces:
- IRule
- public class WhitespaceRule
- extends Object
- implements IRule
An implementation of IRule capable of detecting whitespace.
A whitespace rule uses a whitespace detector in order to find out which
characters are whitespace characters.
- See Also:
IWhitespaceDetector
|
Constructor Summary |
WhitespaceRule(IWhitespaceDetector detector)
Creates a rule which, with the help of an
whitespace detector, will return a whitespace
token when a whitespace is detected. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fDetector
protected IWhitespaceDetector fDetector
- The whitespace detector used by this rule
WhitespaceRule
public WhitespaceRule(IWhitespaceDetector detector)
- Creates a rule which, with the help of an
whitespace detector, will return a whitespace
token when a whitespace is detected.
- Parameters:
detector - the rule's whitespace detector, may not be null
evaluate
public IToken evaluate(ICharacterScanner scanner)
- Description copied from interface:
IRule
- Evaluates the rule by examining the characters available from
the provided character scanner. The token returned by this rule
returns
true when calling isUndefined,
if the text the rule investigated does not match the rule's requirements.
- Specified by:
evaluate in interface IRule
- Following copied from interface:
org.eclipse.jface.text.rules.IRule
- Parameters:
scanner - the character scanner to be used by this rule- Returns:
- the token computed by the rule
Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.