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 BufferedRuleBasedScanner

java.lang.Object
  extended by 

org.eclipse.jface.text.rules.RuleBasedScanner
      extended by 
org.eclipse.jface.text.rules.BufferedRuleBasedScanner
All Implemented Interfaces:
ICharacterScanner, ITokenScanner
Direct Known Subclasses:
RuleBasedPartitionScanner

public class BufferedRuleBasedScanner
extends RuleBasedScanner

A buffered rule based scanner. The buffer always contains a section of a fixed size of the document to be scanned. Completely adheres to the contract of RuleBasedScanner.


Field Summary
 
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
protected BufferedRuleBasedScanner ()
          Creates a new buffered rule based scanner which does not have any rule and a default buffer size of 500 characters.
  BufferedRuleBasedScanner (int size)
          Creates a new buffered rule based scanner which does not have any rule.
 
Method Summary
 int read ()
          Returns the next character or EOF if end of file has been reached
protected  void setBufferSize (int size)
          Sets the buffer to the given number of characters.
 void setRange ( IDocument document, int offset, int length)
          Configures the scanner by providing access to the document range that should be scanned.
 void unread ()
          Rewinds the scanner before the last read character.
 
Methods inherited from class org.eclipse.jface.text.rules. RuleBasedScanner
getColumn, getLegalLineDelimiters, getTokenLength, getTokenOffset, nextToken, setDefaultReturnToken, setRules
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferedRuleBasedScanner

protected BufferedRuleBasedScanner()
Creates a new buffered rule based scanner which does not have any rule and a default buffer size of 500 characters.


BufferedRuleBasedScanner

public BufferedRuleBasedScanner(int size)
Creates a new buffered rule based scanner which does not have any rule. The buffer size is set to the given number of characters.

Parameters:
size - the buffer size
Method Detail

setBufferSize

protected void setBufferSize(int size)
Sets the buffer to the given number of characters.

Parameters:
size - the buffer size

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 RuleBasedScanner
Parameters:
document - the document to scan
offset - the offset of the document range to scan
length - the length of the document range to scan

read

public int read()
Description copied from interface: ICharacterScanner
Returns the next character or EOF if end of file has been reached

Specified by:
read in interface ICharacterScanner
Overrides:
read in class RuleBasedScanner
Returns:
the next character or EOF

unread

public void unread()
Description copied from interface: ICharacterScanner
Rewinds the scanner before the last read character.

Specified by:
unread in interface ICharacterScanner
Overrides:
unread in class RuleBasedScanner

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