org.eclipse.cdt.internal.ui.text
Class FastCPartitionScanner

java.lang.Object
  extended by org.eclipse.cdt.internal.ui.text.FastCPartitionScanner
All Implemented Interfaces:
ICPartitions, org.eclipse.jface.text.rules.IPartitionTokenScanner, org.eclipse.jface.text.rules.ITokenScanner

public final class FastCPartitionScanner
extends java.lang.Object
implements org.eclipse.jface.text.rules.IPartitionTokenScanner, ICPartitions

This scanner recognizes the C multi line comments, C single line comments, C strings, C characters and C preprocessor directives.


Field Summary
 
Fields inherited from interface org.eclipse.cdt.ui.text.ICPartitions
C_CHARACTER, C_MULTI_LINE_COMMENT, C_PARTITIONING, C_PREPROCESSOR, C_SINGLE_LINE_COMMENT, C_STRING
 
Constructor Summary
FastCPartitionScanner()
           
FastCPartitionScanner(boolean emulate)
           
 
Method Summary
 int getTokenLength()
           
 int getTokenOffset()
           
 org.eclipse.jface.text.rules.IToken nextToken()
           
 void setPartialRange(org.eclipse.jface.text.IDocument document, int offset, int length, java.lang.String contentType, int partitionOffset)
           
 void setRange(org.eclipse.jface.text.IDocument document, int offset, int length)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FastCPartitionScanner

public FastCPartitionScanner(boolean emulate)

FastCPartitionScanner

public FastCPartitionScanner()
Method Detail

nextToken

public org.eclipse.jface.text.rules.IToken nextToken()
Specified by:
nextToken in interface org.eclipse.jface.text.rules.ITokenScanner

setPartialRange

public void setPartialRange(org.eclipse.jface.text.IDocument document,
                            int offset,
                            int length,
                            java.lang.String contentType,
                            int partitionOffset)
Specified by:
setPartialRange in interface org.eclipse.jface.text.rules.IPartitionTokenScanner

setRange

public void setRange(org.eclipse.jface.text.IDocument document,
                     int offset,
                     int length)
Specified by:
setRange in interface org.eclipse.jface.text.rules.ITokenScanner

getTokenLength

public int getTokenLength()
Specified by:
getTokenLength in interface org.eclipse.jface.text.rules.ITokenScanner

getTokenOffset

public int getTokenOffset()
Specified by:
getTokenOffset in interface org.eclipse.jface.text.rules.ITokenScanner