Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.text.rules
Class WhitespaceRule

java.lang.Object
  extended by 
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

Field Summary
protected   IWhitespaceDetector fDetector
          The whitespace detector used by this rule
protected   IToken fWhitespaceToken
          The token returned for whitespace.
 
Constructor Summary
WhitespaceRule ( IWhitespaceDetector detector)
          Creates a rule which, with the help of an whitespace detector, will return Token.WHITESPACE when a whitespace is detected.
WhitespaceRule ( IWhitespaceDetector detector, IToken token)
          Creates a rule which, with the help of an whitespace detector, will return the given whitespace token when a whitespace is detected.
 
Method Summary
  IToken evaluate ( ICharacterScanner scanner)
          Evaluates the rule by examining the characters available from the provided character scanner.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fDetector

protected 
IWhitespaceDetector fDetector
The whitespace detector used by this rule


fWhitespaceToken

protected final 
IToken fWhitespaceToken
The token returned for whitespace.

Since:
3.5
Constructor Detail

WhitespaceRule

public WhitespaceRule(
IWhitespaceDetector detector)
Creates a rule which, with the help of an whitespace detector, will return Token.WHITESPACE when a whitespace is detected.

Parameters:
detector - the rule's whitespace detector

WhitespaceRule

public WhitespaceRule(
IWhitespaceDetector detector,
                      
IToken token)
Creates a rule which, with the help of an whitespace detector, will return the given whitespace token when a whitespace is detected.

Parameters:
detector - the rule's whitespace detector
token - the token returned for whitespace
Since:
3.5
Method Detail

evaluate

public 
IToken evaluate(
ICharacterScanner scanner)
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 that the rule investigated does not match the rule's requirements

Specified by:
evaluate in interface IRule
Parameters:
scanner - the character scanner to be used by this rule
Returns:
fWhitespaceToken if whitespace got detected, Token.UNDEFINED otherwise

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire