org.eclipse.datatools.sqltools.sqleditor.internal.editor
Class SQLUpdater

java.lang.Object
  extended by org.eclipse.datatools.sqltools.sqleditor.internal.editor.SQLUpdater
All Implemented Interfaces:
java.lang.Runnable, java.util.EventListener, org.eclipse.jface.text.IDocumentListener, org.eclipse.jface.util.IPropertyChangeListener

public class SQLUpdater
extends java.lang.Object
implements java.lang.Runnable, org.eclipse.jface.text.IDocumentListener, org.eclipse.jface.util.IPropertyChangeListener

This class will listen to the documentChanged event of the SQLEditor and update the outline view( if there is one ) and the annotations.

Author:
Hui Cao

Field Summary
static java.lang.String SOURCE_ID
          Key for the sql syntax and portability markers
 
Constructor Summary
SQLUpdater(SQLEditor editor)
           
 
Method Summary
 void documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent event)
           
 void documentChanged(org.eclipse.jface.text.DocumentEvent event)
           
 boolean needToParse()
           
 void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
           
 void removeMarkers()
          remove all the problem markers.
 void removeMarkers(boolean group)
          remove all the problem markers.
 void run()
           
 void setNeedToParse(boolean needToParse)
           
 void setOutlinePage(SQLOutlinePage outlinePage)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCE_ID

public static final java.lang.String SOURCE_ID
Key for the sql syntax and portability markers

See Also:
Constant Field Values
Constructor Detail

SQLUpdater

public SQLUpdater(SQLEditor editor)
Parameters:
editor -
Method Detail

documentAboutToBeChanged

public void documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent event)
Specified by:
documentAboutToBeChanged in interface org.eclipse.jface.text.IDocumentListener

documentChanged

public void documentChanged(org.eclipse.jface.text.DocumentEvent event)
Specified by:
documentChanged in interface org.eclipse.jface.text.IDocumentListener

propertyChange

public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
Specified by:
propertyChange in interface org.eclipse.jface.util.IPropertyChangeListener

setOutlinePage

public void setOutlinePage(SQLOutlinePage outlinePage)

run

public void run()
Specified by:
run in interface java.lang.Runnable

removeMarkers

public void removeMarkers()
remove all the problem markers. Remember to call it when the file is closing

See Also:
removeMarkers(boolean group), this is a shortcut to removeMarkers(true)

removeMarkers

public void removeMarkers(boolean group)
remove all the problem markers. Remember to call it when the file is closing

Parameters:
group - whether to use IWorkspaceRunnable to group the changes

needToParse

public boolean needToParse()

setNeedToParse

public void setNeedToParse(boolean needToParse)