org.eclipse.datatools.sqltools.sqleditor.internal.utils
Class SQLWordPartDetector

java.lang.Object
  extended by org.eclipse.datatools.sqltools.sqleditor.internal.utils.SQLWordPartDetector

public class SQLWordPartDetector
extends java.lang.Object

This class is used to scan for SQL keywords in a document.


Constructor Summary
SQLWordPartDetector(org.eclipse.jface.text.ITextViewer viewer, int documentOffset)
          Constructs an instance of this class with the given text viewer and document offset.
 
Method Summary
 int getOffset()
          Gets the current document offset.
 java.lang.String getString()
          Gets the current word part from the document.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLWordPartDetector

public SQLWordPartDetector(org.eclipse.jface.text.ITextViewer viewer,
                           int documentOffset)
Constructs an instance of this class with the given text viewer and document offset.

Parameters:
viewer - text viewer for the document
documentOffset - offset into the SQL document
Method Detail

getString

public java.lang.String getString()
Gets the current word part from the document.

Returns:
the word part

getOffset

public int getOffset()
Gets the current document offset.

Returns:
the current document offset.