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
Interface IPredicateRule

All Superinterfaces:
IRule
All Known Implementing Classes:
EndOfLineRule, MultiLineRule, PatternRule, SingleLineRule, WordPatternRule

public interface IPredicateRule
extends IRule

Defines the interface for a rule used in the scanning of text for the purpose of document partitioning or text styling. A predicate rule can only return one single token after having successfully detected content. This token is called success token. Also, it also returns a token indicating that this rule has not been successful.

Since:
2.0
See Also:
ICharacterScanner

Method Summary
  IToken evaluate ( ICharacterScanner scanner, boolean resume)
          Evaluates the rule by examining the characters available from the provided character scanner.
  IToken getSuccessToken ()
          Returns the success token of this predicate rule.
 
Methods inherited from interface org.eclipse.jface.text.rules. IRule
evaluate
 

Method Detail

getSuccessToken

IToken getSuccessToken()
Returns the success token of this predicate rule.

Returns:
the success token of this rule

evaluate

IToken evaluate(
ICharacterScanner scanner,
                boolean resume)
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. Otherwise, this method returns this rule's success token. If this rules relies on a text pattern comprising a opening and a closing character sequence this method can also be called when the scanner is positioned already between the opening and the closing sequence. In this case, resume must be set to true.

Parameters:
scanner - the character scanner to be used by this rule
resume - indicates that the rule starts working between the opening and the closing character sequence
Returns:
the token computed by the rule

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