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
Answertopia.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 RuleBasedPartitionScanner


java.lang.Object
  extended by 

org.eclipse.jface.text.rules.RuleBasedScanner
      extended by 

org.eclipse.jface.text.rules.BufferedRuleBasedScanner
          extended by 
org.eclipse.jface.text.rules.RuleBasedPartitionScanner
All Implemented Interfaces:
ICharacterScanner, IPartitionTokenScanner, ITokenScanner

public class RuleBasedPartitionScanner
extends BufferedRuleBasedScanner
implements IPartitionTokenScanner

Scanner that exclusively uses predicate rules.

Since:
2.0

Field Summary
protected   String fContentType
          The content type of the partition in which to resume scanning.
protected  int fPartitionOffset
          The offset of the partition inside which to resume.
 
Fields inherited from class org.eclipse.jface.text.rules. RuleBasedScanner
fColumn, fDefaultReturnToken, fDelimiters, fDocument, fOffset, fRangeEnd, fRules, fTokenOffset, UNDEFINED
 
Fields inherited from interface org.eclipse.jface.text.rules. ICharacterScanner
EOF
 
Constructor Summary
RuleBasedPartitionScanner ()
           
 
Method Summary
  IToken nextToken ()
          Returns the next token in the document.
 void setPartialRange ( IDocument document, int offset, int length, String contentType, int partitionOffset)
          Configures the scanner by providing access to the document range that should be scanned.
 void setPredicateRules ( IPredicateRule[] rules)
           
 void setRange ( IDocument document, int offset, int length)
          Configures the scanner by providing access to the document range that should be scanned.
 void setRules ( IRule[] rules)
          Disallow setting the rules since this scanner exclusively uses predicate rules.
 
Methods inherited from class org.eclipse.jface.text.rules. BufferedRuleBasedScanner
read, setBufferSize, unread
 
Methods inherited from class org.eclipse.jface.text.rules. RuleBasedScanner
getColumn, getLegalLineDelimiters, getTokenLength, getTokenOffset, setDefaultReturnToken
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.text.rules. ITokenScanner
getTokenLength, getTokenOffset
 

Field Detail

fContentType

protected 
String fContentType
The content type of the partition in which to resume scanning.


fPartitionOffset

protected int fPartitionOffset
The offset of the partition inside which to resume.

Constructor Detail

RuleBasedPartitionScanner

public RuleBasedPartitionScanner()
Method Detail

setRules

public void setRules(
IRule[] rules)
Disallow setting the rules since this scanner exclusively uses predicate rules.

Overrides:
setRules in class RuleBasedScanner
Parameters:
rules - the sequence of rules controlling this scanner

setPredicateRules

public void setPredicateRules(
IPredicateRule[] rules)

setRange

public void setRange(
IDocument document,
                     int offset,
                     int length)
Description copied from interface: ITokenScanner
Configures the scanner by providing access to the document range that should be scanned.

Specified by:
setRange in interface ITokenScanner
Overrides:
setRange in class BufferedRuleBasedScanner
Parameters:
document - the document to scan
offset - the offset of the document range to scan
length - the length of the document range to scan

setPartialRange

public void setPartialRange(
IDocument document,
                            int offset,
                            int length,
                            
String contentType,
                            int partitionOffset)
Description copied from interface: IPartitionTokenScanner
Configures the scanner by providing access to the document range that should be scanned. The range may no only contain complete partitions but starts at the beginning of a line in the middle of a partition of the given content type. This requires that a partition delimiter can not contain a line delimiter.

Specified by:
setPartialRange in interface IPartitionTokenScanner
Parameters:
document - the document to scan
offset - the offset of the document range to scan
length - the length of the document range to scan
contentType - the content type at the given offset
partitionOffset - the offset at which the partition of the given offset starts

nextToken

public 
IToken nextToken()
Description copied from interface: ITokenScanner
Returns the next token in the document.

Specified by:
nextToken in interface ITokenScanner
Overrides:
nextToken in class RuleBasedScanner
Returns:
the next token in the document

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