|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
org.eclipse.ui.texteditor.AbstractTextEditor
org.eclipse.ui.texteditor.StatusTextEditor
org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
org.eclipse.ui.editors.text.TextEditor
org.eclipse.datatools.sqltools.sqleditor.SQLEditor
public class SQLEditor
This class is responsible for configuring the SQL editor.
Nested Class Summary | |
---|---|
class |
SQLEditor.AdaptedSourceViewer
|
Nested classes/interfaces inherited from interface org.eclipse.ui.texteditor.ITextEditorExtension3 |
---|
org.eclipse.ui.texteditor.ITextEditorExtension3.InsertMode |
Field Summary | |
---|---|
static java.lang.String |
HELP_CONTEXT_ID
|
static java.lang.String |
PLUGIN_NAME
|
Fields inherited from class org.eclipse.ui.texteditor.AbstractDecoratedTextEditor |
---|
DEFAULT_OVERVIEW_RULER_CONTEXT_MENU_ID |
Fields inherited from class org.eclipse.ui.texteditor.AbstractTextEditor |
---|
DEFAULT_EDITOR_CONTEXT_MENU_ID, DEFAULT_RULER_CONTEXT_MENU_ID, PREFERENCE_COLOR_BACKGROUND, PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, PREFERENCE_COLOR_FIND_SCOPE, PREFERENCE_COLOR_FOREGROUND, PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT, PREFERENCE_COLOR_SELECTION_BACKGROUND, PREFERENCE_COLOR_SELECTION_BACKGROUND_SYSTEM_DEFAULT, PREFERENCE_COLOR_SELECTION_FOREGROUND, PREFERENCE_COLOR_SELECTION_FOREGROUND_SYSTEM_DEFAULT, PREFERENCE_FONT, PREFERENCE_HOVER_ENRICH_MODE, PREFERENCE_HYPERLINK_KEY_MODIFIER, PREFERENCE_HYPERLINK_KEY_MODIFIER_MASK, PREFERENCE_HYPERLINKS_ENABLED, PREFERENCE_NAVIGATION_SMART_HOME_END, PREFERENCE_RULER_CONTRIBUTIONS, PREFERENCE_SHOW_WHITESPACE_CHARACTERS, PREFERENCE_TEXT_DRAG_AND_DROP_ENABLED, PREFERENCE_USE_CUSTOM_CARETS, PREFERENCE_WIDE_CARET |
Fields inherited from interface org.eclipse.ui.IEditorPart |
---|
PROP_DIRTY, PROP_INPUT |
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
---|
PROP_TITLE |
Fields inherited from interface org.eclipse.ui.IEditorPart |
---|
PROP_DIRTY, PROP_INPUT |
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
---|
PROP_TITLE |
Fields inherited from interface org.eclipse.ui.texteditor.ITextEditorExtension3 |
---|
INSERT, SMART_INSERT |
Constructor Summary | |
---|---|
SQLEditor()
Constructs an instance of this class. |
Method Summary | |
---|---|
void |
addConnectionProfileAttachListener(IConnectionProfileAttachListener listener)
|
void |
createPartControl(org.eclipse.swt.widgets.Composite parent)
Creates the SWT controls for the editor. |
void |
dispose()
Dispose of resources held by this editor. |
void |
doRevertToSaved()
Abandons all modifications applied to this text editor's input element's textual presentation since the last save operation. |
void |
doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
Saves the content of this editor. |
void |
doSaveAs()
Saves the contents of this editor to another object. |
void |
doSetInput(org.eclipse.ui.IEditorInput input)
Sets the input of the outline page after this class has set input. |
void |
fireConnectionProfileAttached()
|
java.lang.Object |
getAdapter(java.lang.Class classForWhichAdapterNeeded)
Gets an adapter for the given class. |
ISQLEditorConnectionInfo |
getConnectionInfo()
Gets the connection info object of the editor input of this editor. |
Database |
getDatabase()
Gets the Database object associated with this input. |
org.eclipse.datatools.sqltools.core.DatabaseIdentifier |
getDatabaseIdentifier()
Returns the DatabaseIdentifier associated with the connection info. |
ISQLDBProposalsService |
getDBProposalsService()
Gets the DBProposalsService object that provides content assist services for this editor. |
java.lang.String |
getDBType()
|
java.lang.String |
getDefaultSchemaName()
Gets the default schema name to use with the connection or database associated with this input. |
SQLEditorDocumentSetupParticipant |
getDocumentSetupParticipant()
Gets the document setup participant object associated with this editor. |
int |
getOrientation()
|
org.eclipse.ui.IEditorPart |
getParentEditor()
Gets the multipage editor to which this sql editor belongs |
ParsingResult |
getParsingResult()
Returns the parsing result no matter the "Enable syntax validation" is on or off. |
java.util.ResourceBundle |
getResourceBundle()
Gets the resource bundle associated with this editor. |
java.lang.String |
getSelectedText()
Returns the selected text. |
SQLColorProvider |
getSQLColorProvider()
Gets the color provider for colorizing SQL source code. |
int |
getSQLType()
Returns the outmost sql statement type that's allowed in this editor. |
org.eclipse.jface.text.source.ISourceViewer |
getSV()
Makes the source viewer public. |
java.lang.String |
getTargetText()
|
java.lang.String |
getText()
Returns the complete text in this editor. |
void |
gotoMatchingToken()
Going to matching token. |
void |
init(org.eclipse.ui.IEditorSite site,
org.eclipse.ui.IEditorInput input)
|
void |
insert(java.lang.String sqlText)
Insert the SQL text into editor |
boolean |
isConnected()
Utility methods to "getConnectionInfo().isConnected()" |
void |
outlinePageClosed()
Informs the editor that its outliner has been closed. |
void |
propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
Handles notifications to the object that a property has changed. |
void |
refreshConnectionStatus()
Refreshes the status area indicating the connection state. |
void |
removeConnectionProfileAttachListener(IConnectionProfileAttachListener listener)
|
void |
requestConnection()
Requests a connection. |
ISQLEditorConnectionInfo |
requestConnectionFromUser()
Prompts the user to select an existing connection or create a new one. |
void |
setConnectionInfo(ISQLEditorConnectionInfo connInfo)
Sets the connection info object of the editor input of this editor. |
void |
setDocumentSetupParticipant(SQLEditorDocumentSetupParticipant docSetupParticipant)
Sets the document setup participant object associated with this editor to the given object. |
void |
setFocus()
Asks this part to take focus within the workbench. |
void |
setParentEditor(org.eclipse.ui.IEditorPart editor)
Sets the multipage editor to which this sql editor belongs |
void |
setParsingResult(ParsingResult result)
|
void |
updatePartControl(org.eclipse.ui.IEditorInput input)
|
Methods inherited from class org.eclipse.ui.editors.text.TextEditor |
---|
isSaveAsAllowed |
Methods inherited from class org.eclipse.ui.texteditor.AbstractDecoratedTextEditor |
---|
getDocumentProvider, gotoAnnotation, gotoMarker, isChangeInformationShowing, isEditable, showChangeInformation, showRevisionInformation, validateEditorInputState |
Methods inherited from class org.eclipse.ui.texteditor.AbstractTextEditor |
---|
addRulerContextMenuListener, close, createEmptyNavigationLocation, createNavigationLocation, getAction, getActiveSaveables, getHighlightRange, getInsertMode, getSaveables, getSelectionProvider, isDirty, isEditorInputModifiable, isEditorInputReadOnly, markAsContentDependentAction, markAsPropertyDependentAction, markAsSelectionDependentAction, markAsStateDependentAction, removeActionActivationCode, removeRulerContextMenuListener, resetHighlightRange, restoreState, saveState, selectAndReveal, setAction, setActionActivationCode, setHighlightRange, setInput, setInsertMode, setStatusField, showHighlightRangeOnly, showsHighlightRangeOnly |
Methods inherited from class org.eclipse.ui.part.EditorPart |
---|
getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setInitializationData |
Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
---|
addPartPropertyListener, addPropertyListener, getContentDescription, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, showBusy |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.ui.IEditorPart |
---|
getEditorInput, getEditorSite |
Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
---|
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener |
Methods inherited from interface org.eclipse.ui.ISaveablePart |
---|
isSaveOnCloseNeeded |
Methods inherited from interface org.eclipse.ui.IEditorPart |
---|
getEditorInput, getEditorSite |
Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
---|
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener |
Methods inherited from interface org.eclipse.ui.ISaveablePart |
---|
isSaveOnCloseNeeded |
Field Detail |
---|
public static final java.lang.String PLUGIN_NAME
public static final java.lang.String HELP_CONTEXT_ID
Constructor Detail |
---|
public SQLEditor()
Method Detail |
---|
public void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input) throws org.eclipse.ui.PartInitException
init
in interface org.eclipse.ui.IEditorPart
init
in class org.eclipse.ui.texteditor.AbstractTextEditor
org.eclipse.ui.PartInitException
public void createPartControl(org.eclipse.swt.widgets.Composite parent)
createPartControl
in interface org.eclipse.ui.IWorkbenchPart
createPartControl
in class org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
AbstractTextEditor.createPartControl(org.eclipse.swt.widgets.Composite)
public void updatePartControl(org.eclipse.ui.IEditorInput input)
updatePartControl
in class org.eclipse.ui.texteditor.StatusTextEditor
public void dispose()
dispose
in interface org.eclipse.ui.IWorkbenchPart
dispose
in class org.eclipse.ui.editors.text.TextEditor
IWorkbenchPart.dispose()
public org.eclipse.ui.IEditorPart getParentEditor()
editor
- public void setParentEditor(org.eclipse.ui.IEditorPart editor)
editor
- public void doRevertToSaved()
doRevertToSaved
in interface org.eclipse.ui.texteditor.ITextEditor
doRevertToSaved
in class org.eclipse.ui.texteditor.StatusTextEditor
ITextEditor.doRevertToSaved()
public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
doSave
in interface org.eclipse.ui.ISaveablePart
doSave
in class org.eclipse.ui.texteditor.AbstractTextEditor
progressMonitor
- the progress monitor for communicating result state or null
ISaveablePart.doSave(org.eclipse.core.runtime.IProgressMonitor)
public void doSaveAs()
doSaveAs
in interface org.eclipse.ui.ISaveablePart
doSaveAs
in class org.eclipse.ui.texteditor.AbstractTextEditor
ISaveablePart.doSaveAs()
public void doSetInput(org.eclipse.ui.IEditorInput input) throws org.eclipse.core.runtime.CoreException
doSetInput
in class org.eclipse.ui.editors.text.TextEditor
input
- the new input for the editor
org.eclipse.core.runtime.CoreException
TextEditor.doSetInput(org.eclipse.ui.IEditorInput)
public java.lang.Object getAdapter(java.lang.Class classForWhichAdapterNeeded)
getAdapter
in interface org.eclipse.core.runtime.IAdaptable
getAdapter
in class org.eclipse.ui.editors.text.TextEditor
IAdaptable.getAdapter(java.lang.Class)
,
ProjectionSupport.getAdapter(org.eclipse.jface.text.source.ISourceViewer,
java.lang.Class)
public ISQLEditorConnectionInfo getConnectionInfo()
public void setConnectionInfo(ISQLEditorConnectionInfo connInfo)
connInfo
- the new connection info objectpublic void requestConnection()
public Database getDatabase()
Database
object associated with this input.
Database
object associated with this inputpublic ISQLDBProposalsService getDBProposalsService()
DBProposalsService
object that provides content assist services for this editor.
DBProposalsService
objectpublic java.lang.String getDefaultSchemaName()
public SQLEditorDocumentSetupParticipant getDocumentSetupParticipant()
public java.util.ResourceBundle getResourceBundle()
public SQLColorProvider getSQLColorProvider()
public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
propertyChange
in interface org.eclipse.jface.util.IPropertyChangeListener
event
- the property change event object describing which property changed and howpublic void setDocumentSetupParticipant(SQLEditorDocumentSetupParticipant docSetupParticipant)
public void setFocus()
setFocus
in interface org.eclipse.ui.IWorkbenchPart
setFocus
in class org.eclipse.ui.texteditor.AbstractTextEditor
IWorkbenchPart.setFocus()
public ISQLEditorConnectionInfo requestConnectionFromUser()
ISQLEditorConnectionInfo
object for the chosen connection.
ISQLEditorConnectionInfo
object for the selected connection or null if none selectedpublic org.eclipse.jface.text.source.ISourceViewer getSV()
public void outlinePageClosed()
public ParsingResult getParsingResult()
public void setParsingResult(ParsingResult result)
node
- the new parsing resultpublic void refreshConnectionStatus()
public java.lang.String getText()
public java.lang.String getSelectedText()
public int getOrientation()
getOrientation
in interface org.eclipse.ui.part.IWorkbenchPartOrientation
getOrientation
in class org.eclipse.ui.part.WorkbenchPart
public java.lang.String getTargetText()
public int getSQLType()
public void addConnectionProfileAttachListener(IConnectionProfileAttachListener listener)
public void removeConnectionProfileAttachListener(IConnectionProfileAttachListener listener)
public void fireConnectionProfileAttached()
public org.eclipse.datatools.sqltools.core.DatabaseIdentifier getDatabaseIdentifier()
public java.lang.String getDBType()
public void insert(java.lang.String sqlText)
sqlText
- public boolean isConnected()
public void gotoMatchingToken()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |