Interface IRule

All Known Subinterfaces:
IPredicateRule
All Known Implementing Classes:
EndOfLineRule, MultiLineRule, NumberRule, PatternRule, SingleLineRule, WhitespaceRule, WordPatternRule, WordRule

public interface IRule
Defines the interface for a rule used in the scanning of text for the purpose of document partitioning or text styling. Originally since unknown version, but moved to org.eclipse.text in 3.14
Since:
3.14
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Evaluates the rule by examining the characters available from the provided character scanner.
  • Method Details

    • evaluate

      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
      Parameters:
      scanner - the character scanner to be used by this rule
      Returns:
      the token computed by the rule