com.ibm.lab.soln.sqleditor.sql
Class SQLPartitionScanner

java.lang.Object
  |
  +--org.eclipse.jface.text.rules.RuleBasedScanner
        |
        +--org.eclipse.jface.text.rules.BufferedRuleBasedScanner
              |
              +--org.eclipse.jface.text.rules.RuleBasedPartitionScanner
                    |
                    +--com.ibm.lab.soln.sqleditor.sql.SQLPartitionScanner
All Implemented Interfaces:
org.eclipse.jface.text.rules.ICharacterScanner, org.eclipse.jface.text.rules.IPartitionTokenScanner, org.eclipse.jface.text.rules.ITokenScanner

public class SQLPartitionScanner
extends org.eclipse.jface.text.rules.RuleBasedPartitionScanner

The SQLPartitionScanner is a RulesBasedPartitionScanner. The SQL document partitions are computed dynamically as events signal that the document has changed. The document partitions are based on tokens that represent comments and SQL code sections.


Field Summary
static java.lang.String SQL_CODE
           
static java.lang.String SQL_COMMENT
           
static java.lang.String SQL_MULTILINE_COMMENT
           
 
Fields inherited from class org.eclipse.jface.text.rules.RuleBasedPartitionScanner
fContentType, fPartitionOffset
 
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
SQLPartitionScanner()
          Constructor for SQLPartitionScanner.
 
Methods inherited from class org.eclipse.jface.text.rules.RuleBasedPartitionScanner
nextToken, setPartialRange, setPredicateRules, setRange, setRules
 
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

SQL_CODE

public static final java.lang.String SQL_CODE

SQL_COMMENT

public static final java.lang.String SQL_COMMENT

SQL_MULTILINE_COMMENT

public static final java.lang.String SQL_MULTILINE_COMMENT
Constructor Detail

SQLPartitionScanner

public SQLPartitionScanner()
Constructor for SQLPartitionScanner. Creates rules to parse comment partitions in an SQL document. In the constructor, is defined the entire set of rules used to parse the SQL document, in an instance of an IPredicateRule. The coonstructor calls setPredicateRules method which associates the rules to the scanner and makes the document ready for parsing.