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

java.lang.Object
  extended by org.eclipse.jface.text.source.SourceViewerConfiguration
      extended by org.eclipse.datatools.sqltools.sqleditor.internal.editor.SQLSourceViewerConfiguration

public class SQLSourceViewerConfiguration
extends org.eclipse.jface.text.source.SourceViewerConfiguration

This class defines the editor add-ons; content assist, content formatter, highlighting, auto-indent strategy, double click strategy.


Constructor Summary
SQLSourceViewerConfiguration()
          Constructs an instance of this class.
SQLSourceViewerConfiguration(SQLEditor editor)
          Constructs an instance of this class with the given SQLEditor to configure.
 
Method Summary
 org.eclipse.jface.text.source.IAnnotationHover getAnnotationHover(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
          Returns the annotation hover which will provide the information to be shown in a hover popup window when requested for the given source viewer.
 org.eclipse.jface.text.IAutoEditStrategy[] getAutoEditStrategies(org.eclipse.jface.text.source.ISourceViewer sourceViewer, java.lang.String contentType)
           
 java.lang.String[] getConfiguredContentTypes(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
           
 java.lang.String getConfiguredDocumentPartitioning(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
          Returns the configured partitioning for the given source viewer.
 org.eclipse.jface.text.contentassist.IContentAssistant getContentAssistant(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
          Creates, initializes, and returns the ContentAssistant to use with this editor.
 org.eclipse.jface.text.formatter.IContentFormatter getContentFormatter(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
          Creates, configures, and returns the ContentFormatter to use.
 ISQLDBProposalsService getDBProposalsService()
          Gets the DBProposalsService object that provides content assist services for this editor.
 java.lang.String[] getDefaultPrefixes(org.eclipse.jface.text.source.ISourceViewer sourceViewer, java.lang.String contentType)
           
 org.eclipse.jface.text.ITextDoubleClickStrategy getDoubleClickStrategy(org.eclipse.jface.text.source.ISourceViewer sourceViewer, java.lang.String contentType)
          Returns the double-click strategy ready to be used in this viewer when double clicking onto text of the given content type.
 org.eclipse.jface.text.IInformationControlCreator getInformationControlCreator(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
           
 org.eclipse.jface.text.information.IInformationPresenter getInformationPresenter(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
           
 org.eclipse.jface.text.presentation.IPresentationReconciler getPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
          Creates, configures, and returns a presentation reconciler to help with document changes.
 SQLEditor getSQLEditor()
          Returns the SQLEditor associated with this object.
 int getTabWidth(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
           
 org.eclipse.jface.text.ITextHover getTextHover(org.eclipse.jface.text.source.ISourceViewer sourceViewer, java.lang.String contentType)
          Returns the text hover which will provide the information to be shown in a text hover popup window when requested for the given source viewer and the given content type.
 void setDBProposalsService(ISQLDBProposalsService dbProposalsService)
          Sets the ISQLDBProposalsService object that provides content assist services for this viewer to the given object.
 void setSQLEditor(SQLEditor editor)
          Associates the SQLEditor with this object.
 
Methods inherited from class org.eclipse.jface.text.source.SourceViewerConfiguration
getAutoIndentStrategy, getConfiguredTextHoverStateMasks, getHyperlinkDetectors, getHyperlinkPresenter, getHyperlinkStateMask, getIndentPrefixes, getOverviewRulerAnnotationHover, getQuickAssistAssistant, getReconciler, getTextHover, getUndoManager
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLSourceViewerConfiguration

public SQLSourceViewerConfiguration()
Constructs an instance of this class.


SQLSourceViewerConfiguration

public SQLSourceViewerConfiguration(SQLEditor editor)
Constructs an instance of this class with the given SQLEditor to configure.

Parameters:
editor - the SQLEditor to configure
Method Detail

getAnnotationHover

public org.eclipse.jface.text.source.IAnnotationHover getAnnotationHover(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
Returns the annotation hover which will provide the information to be shown in a hover popup window when requested for the given source viewer.

Overrides:
getAnnotationHover in class org.eclipse.jface.text.source.SourceViewerConfiguration
See Also:
SourceViewerConfiguration.getAnnotationHover(org.eclipse.jface.text.source.ISourceViewer)

getAutoEditStrategies

public org.eclipse.jface.text.IAutoEditStrategy[] getAutoEditStrategies(org.eclipse.jface.text.source.ISourceViewer sourceViewer,
                                                                        java.lang.String contentType)
Overrides:
getAutoEditStrategies in class org.eclipse.jface.text.source.SourceViewerConfiguration

getConfiguredDocumentPartitioning

public java.lang.String getConfiguredDocumentPartitioning(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
Returns the configured partitioning for the given source viewer. The partitioning is used when the querying content types from the source viewer's input document.

Overrides:
getConfiguredDocumentPartitioning in class org.eclipse.jface.text.source.SourceViewerConfiguration
See Also:
SourceViewerConfiguration.getConfiguredDocumentPartitioning(org.eclipse.jface.text.source.ISourceViewer)

getContentAssistant

public org.eclipse.jface.text.contentassist.IContentAssistant getContentAssistant(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
Creates, initializes, and returns the ContentAssistant to use with this editor.

Overrides:
getContentAssistant in class org.eclipse.jface.text.source.SourceViewerConfiguration
See Also:
SourceViewerConfiguration.getContentAssistant(ISourceViewer)

getInformationControlCreator

public org.eclipse.jface.text.IInformationControlCreator getInformationControlCreator(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
Overrides:
getInformationControlCreator in class org.eclipse.jface.text.source.SourceViewerConfiguration

getContentFormatter

public org.eclipse.jface.text.formatter.IContentFormatter getContentFormatter(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
Creates, configures, and returns the ContentFormatter to use.

Overrides:
getContentFormatter in class org.eclipse.jface.text.source.SourceViewerConfiguration
See Also:
SourceViewerConfiguration.getContentFormatter(ISourceViewer)

getDBProposalsService

public ISQLDBProposalsService getDBProposalsService()
Gets the DBProposalsService object that provides content assist services for this editor.

Returns:
the current DBProposalsService object

getDoubleClickStrategy

public org.eclipse.jface.text.ITextDoubleClickStrategy getDoubleClickStrategy(org.eclipse.jface.text.source.ISourceViewer sourceViewer,
                                                                              java.lang.String contentType)
Returns the double-click strategy ready to be used in this viewer when double clicking onto text of the given content type. (Note: the same double-click strategy object is used for all content types.)

Overrides:
getDoubleClickStrategy in class org.eclipse.jface.text.source.SourceViewerConfiguration
See Also:
SourceViewerConfiguration.getDoubleClickStrategy(ISourceViewer, String)

getPresentationReconciler

public org.eclipse.jface.text.presentation.IPresentationReconciler getPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
Creates, configures, and returns a presentation reconciler to help with document changes.

Overrides:
getPresentationReconciler in class org.eclipse.jface.text.source.SourceViewerConfiguration
See Also:
SourceViewerConfiguration.getPresentationReconciler(ISourceViewer)

getSQLEditor

public SQLEditor getSQLEditor()
Returns the SQLEditor associated with this object.

Returns:
the SQLEditor that this object configures

setSQLEditor

public void setSQLEditor(SQLEditor editor)
Associates the SQLEditor with this object.


getTextHover

public org.eclipse.jface.text.ITextHover getTextHover(org.eclipse.jface.text.source.ISourceViewer sourceViewer,
                                                      java.lang.String contentType)
Returns the text hover which will provide the information to be shown in a text hover popup window when requested for the given source viewer and the given content type.

Overrides:
getTextHover in class org.eclipse.jface.text.source.SourceViewerConfiguration
See Also:
SourceViewerConfiguration.getTextHover(org.eclipse.jface.text.source.ISourceViewer, java.lang.String)

setDBProposalsService

public void setDBProposalsService(ISQLDBProposalsService dbProposalsService)
Sets the ISQLDBProposalsService object that provides content assist services for this viewer to the given object.

Parameters:
the - ISQLDBProposalsService object to set

getConfiguredContentTypes

public java.lang.String[] getConfiguredContentTypes(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
Overrides:
getConfiguredContentTypes in class org.eclipse.jface.text.source.SourceViewerConfiguration

getDefaultPrefixes

public java.lang.String[] getDefaultPrefixes(org.eclipse.jface.text.source.ISourceViewer sourceViewer,
                                             java.lang.String contentType)
Overrides:
getDefaultPrefixes in class org.eclipse.jface.text.source.SourceViewerConfiguration

getInformationPresenter

public org.eclipse.jface.text.information.IInformationPresenter getInformationPresenter(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
Overrides:
getInformationPresenter in class org.eclipse.jface.text.source.SourceViewerConfiguration

getTabWidth

public int getTabWidth(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
Overrides:
getTabWidth in class org.eclipse.jface.text.source.SourceViewerConfiguration