|
Eclipse Platform Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.text.rules.RuleBasedScanner
org.eclipse.jface.text.rules.BufferedRuleBasedScanner
public class BufferedRuleBasedScanner
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 |
|---|
protected BufferedRuleBasedScanner()
public BufferedRuleBasedScanner(int size)
size - the buffer size| Method Detail |
|---|
protected void setBufferSize(int size)
size - the buffer size
public void setRange(IDocument document,
int offset,
int length)
ITokenScanner
setRange in interface ITokenScannersetRange in class RuleBasedScannerdocument - the document to scanoffset - the offset of the document range to scanlength - the length of the document range to scanpublic int read()
ICharacterScanner
read in interface ICharacterScannerread in class RuleBasedScannerpublic void unread()
ICharacterScanner
unread in interface ICharacterScannerunread in class RuleBasedScanner
|
Eclipse Platform Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.