org.radrails.db.internal.ui.editors.sql
Class SQLPartitionScanner
java.lang.Object
org.eclipse.jface.text.rules.RuleBasedScanner
org.eclipse.jface.text.rules.BufferedRuleBasedScanner
org.eclipse.jface.text.rules.RuleBasedPartitionScanner
org.radrails.db.internal.ui.editors.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
, a subclass of a RulesBasedPartitionScanner
,
is responsible for dynamically computing the partitions of its
SQL document as events signal that the document has
changed. The document partitions are based on tokens that represent comments
and SQL code sections.
Fields inherited from interface org.eclipse.jface.text.rules.ICharacterScanner |
EOF |
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, unread |
Methods inherited from class org.eclipse.jface.text.rules.RuleBasedScanner |
getColumn, getLegalLineDelimiters, getTokenLength, getTokenOffset, setDefaultReturnToken |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.jface.text.rules.ITokenScanner |
getTokenLength, getTokenOffset |
SQL_COMMENT
public static final java.lang.String SQL_COMMENT
- See Also:
- Constant Field Values
SQL_MULTILINE_COMMENT
public static final java.lang.String SQL_MULTILINE_COMMENT
- See Also:
- Constant Field Values
SQL_CODE
public static final java.lang.String SQL_CODE
- See Also:
- Constant Field Values
SQL_PARTITION_TYPES
public static final java.lang.String[] SQL_PARTITION_TYPES
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.