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 ITokenScanner

All Known Subinterfaces:
IPartitionTokenScanner
All Known Implementing Classes:
BufferedRuleBasedScanner, RuleBasedPartitionScanner, RuleBasedScanner

public interface ITokenScanner

A token scanner scans a range of a document and reports about the token it finds. A scanner has state. When asked, the scanner returns the offset and the length of the last found token.

Since:
2.0
See Also:
IToken

Method Summary
 int getTokenLength ()
          Returns the length of the last token read by this scanner.
 int getTokenOffset ()
          Returns the offset of the last token read by this scanner.
  IToken nextToken ()
          Returns the next token in the document.
 void setRange ( IDocument document, int offset, int length)
          Configures the scanner by providing access to the document range that should be scanned.
 

Method Detail

setRange

void setRange(
IDocument document,
              int offset,
              int length)
Configures the scanner by providing access to the document range that should be scanned.

Parameters:
document - the document to scan
offset - the offset of the document range to scan
length - the length of the document range to scan

nextToken

IToken nextToken()
Returns the next token in the document.

Returns:
the next token in the document

getTokenOffset

int getTokenOffset()
Returns the offset of the last token read by this scanner.

Returns:
the offset of the last token read by this scanner

getTokenLength

int getTokenLength()
Returns the length of the last token read by this scanner.

Returns:
the length of the last token read by this scanner

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