## org.eclipse.datatools.sqltools.sqlbuilder.views.source
Class SQLPartitionScanner

    java.lang.Object
      org.eclipse.jface.text.rules.RuleBasedScanner
          org.eclipse.jface.text.rules.BufferedRuleBasedScanner
              org.eclipse.jface.text.rules.RuleBasedPartitionScanner
                  org.eclipse.datatools.sqltools.sqlbuilder.views.source.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

Field Summary
`static java.lang.String` `SQL_ALTER`
`static java.lang.String` `SQL_CATALOG`
`static java.lang.String` `SQL_COMMENT`
`static java.lang.String` `SQL_COMMENT_ST`
`static java.lang.String` `SQL_COMMIT`
`static java.lang.String` `SQL_CONNECT`
`static java.lang.String` `SQL_CREATE`
`static java.lang.String` `SQL_DEFAULT`
`static java.lang.String` `SQL_DELETE`
`static java.lang.String` `SQL_DELIMITED_IDENTIFIER`
`static java.lang.String` `SQL_DISCONNECT`
`static java.lang.String` `SQL_DROP`
`static java.lang.String` `SQL_GRANT`
`static java.lang.String` `SQL_INSERT`
`static java.lang.String` `SQL_QUOTED_LITERAL`
`static java.lang.String` `SQL_QUOTES`
`static java.lang.String` `SQL_REVOKE`
`static java.lang.String` `SQL_ROLLBACK`
`static java.lang.String` `SQL_SELECT`
`static java.lang.String` `SQL_SET`
`static java.lang.String` `SQL_SIGNAL`
`static java.lang.String` `SQL_TERMINATE`
`static java.lang.String` `SQL_UNCATALOG`
`static java.lang.String` `SQL_UNKNOWNSQL`
`static java.lang.String` `SQL_UPDATE`
`static java.lang.String` `SQL_WITH`

Fields inherited from interface org.eclipse.jface.text.rules.ICharacterScanner
`EOF`

Constructor Summary
`SQLPartitionScanner()` SQLPartitionScanner constructor comment.

Method Summary
`static org.eclipse.jface.text.ITypedRegion[]` `getDocumentRegions(org.eclipse.jface.text.IDocument doc)` Gets the partitions of the given document as an array of `ITypedRegion` objects.

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`

Field Detail

### SQL_DEFAULT

    public static final java.lang.String SQL_DEFAULT

See Also:
  Constant Field Values

### SQL_COMMENT

    public static final java.lang.String SQL_COMMENT

See Also:
  Constant Field Values

### SQL_QUOTES

    public static final java.lang.String SQL_QUOTES

See Also:
  Constant Field Values

### SQL_QUOTED_LITERAL

    public static final java.lang.String SQL_QUOTED_LITERAL

See Also:
  Constant Field Values

### SQL_DELIMITED_IDENTIFIER

    public static final java.lang.String SQL_DELIMITED_IDENTIFIER

See Also:
  Constant Field Values

### SQL_SELECT

    public static final java.lang.String SQL_SELECT

See Also:
  Constant Field Values

### SQL_INSERT

    public static final java.lang.String SQL_INSERT

See Also:
  Constant Field Values

### SQL_UPDATE

    public static final java.lang.String SQL_UPDATE

See Also:
  Constant Field Values

### SQL_DELETE

    public static final java.lang.String SQL_DELETE

See Also:
  Constant Field Values

### SQL_WITH

    public static final java.lang.String SQL_WITH

See Also:
  Constant Field Values

### SQL_CREATE

    public static final java.lang.String SQL_CREATE

See Also:
  Constant Field Values

### SQL_DROP

    public static final java.lang.String SQL_DROP

See Also:
  Constant Field Values

### SQL_ALTER

    public static final java.lang.String SQL_ALTER

See Also:
  Constant Field Values

### SQL_GRANT

    public static final java.lang.String SQL_GRANT

See Also:
  Constant Field Values

### SQL_REVOKE

    public static final java.lang.String SQL_REVOKE

See Also:
  Constant Field Values

### SQL_COMMIT

    public static final java.lang.String SQL_COMMIT

See Also:
  Constant Field Values

### SQL_ROLLBACK

    public static final java.lang.String SQL_ROLLBACK

See Also:
  Constant Field Values

### SQL_SET

    public static final java.lang.String SQL_SET

See Also:
  Constant Field Values

### SQL_CONNECT

    public static final java.lang.String SQL_CONNECT

See Also:
  Constant Field Values

### SQL_DISCONNECT

    public static final java.lang.String SQL_DISCONNECT

See Also:
  Constant Field Values

### SQL_COMMENT_ST

    public static final java.lang.String SQL_COMMENT_ST

See Also:
  Constant Field Values

### SQL_TERMINATE

    public static final java.lang.String SQL_TERMINATE

See Also:
  Constant Field Values

### SQL_CATALOG

    public static final java.lang.String SQL_CATALOG

See Also:
  Constant Field Values

### SQL_UNCATALOG

    public static final java.lang.String SQL_UNCATALOG

See Also:
  Constant Field Values

### SQL_SIGNAL

    public static final java.lang.String SQL_SIGNAL

See Also:
  Constant Field Values

### SQL_UNKNOWNSQL

    public static final java.lang.String SQL_UNKNOWNSQL

See Also:
  Constant Field Values

Constructor Detail

### SQLPartitionScanner

    public SQLPartitionScanner()

  SQLPartitionScanner constructor comment.

Method Detail

### getDocumentRegions

    public static org.eclipse.jface.text.ITypedRegion[] getDocumentRegions(org.eclipse.jface.text.IDocument doc)

  Gets the partitions of the given document as an array of `ITypedRegion` objects. There is a distinct non-overlapping partition for each comment line, string literal, delimited identifier, and "everything else" (that is, SQL code other than a string literal or delimited identifier).

  Parameters:
    `doc` - the document to parse into partitions
  Returns:
    an array containing the document partion regions