|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTextEditor
org.eclipse.datatools.sqltools.sqleditor.SQLEditor
This class is responsible for configuring the SQL editor.
Nested Class Summary | |
class |
SQLEditor.AdaptedSourceViewer
|
Field Summary | |
static java.lang.String |
HELP_CONTEXT_ID
|
static java.lang.String |
PLUGIN_NAME
|
Constructor Summary | |
SQLEditor()
Constructs an instance of this class. |
Method Summary | |
void |
addConnectionProfileAttachListener(IConnectionProfileAttachListener listener)
|
void |
createPartControl(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(IProgressMonitor monitor)
Saves the content of this editor. |
void |
doSaveAs()
Saves the contents of this editor to another object. |
void |
doSetInput(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. |
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()
|
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. |
ISourceViewer |
getSV()
Makes the source viewer public. |
java.lang.String |
getTargetText()
|
java.lang.String |
getText()
Returns the complete text in this editor. |
void |
init(IEditorSite site,
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(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(IEditorPart editor)
Sets the multipage editor to which this sql editor belongs |
void |
setParsingResult(ParsingResult result)
|
void |
updatePartControl(IEditorInput input)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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(IEditorSite site, IEditorInput input) throws PartInitException
PartInitException
public void createPartControl(Composite parent)
org.eclipse.ui.texteditor.AbstractTextEditor#createPartControl(org.eclipse.swt.widgets.Composite)
public void updatePartControl(IEditorInput input)
public void dispose()
IWorkbenchPart#dispose()
public IEditorPart getParentEditor()
public void setParentEditor(IEditorPart editor)
editor
- public void doRevertToSaved()
ITextEditor#doRevertToSaved()
public void doSave(IProgressMonitor monitor)
org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor)
public void doSaveAs()
org.eclipse.ui.ISaveablePart#doSaveAs()
public void doSetInput(IEditorInput input) throws CoreException
input
- the new input for the editor
CoreException
org.eclipse.ui.editors.text.TextEditor#doSetInput(org.eclipse.ui.IEditorInput)
public java.lang.Object getAdapter(java.lang.Class classForWhichAdapterNeeded)
org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
,
org.eclipse.jface.text.source.projection.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(PropertyChangeEvent event)
event
- the property change event object describing which property
changed and howpublic void setDocumentSetupParticipant(SQLEditorDocumentSetupParticipant docSetupParticipant)
public void setFocus()
org.eclipse.ui.IWorkbenchPart#setFocus()
public ISQLEditorConnectionInfo requestConnectionFromUser()
ISQLEditorConnectionInfo
object for the chosen connection.
ISQLEditorConnectionInfo
object for the selected connection or
null if none selectedpublic ISourceViewer getSV()
public void outlinePageClosed()
public ParsingResult getParsingResult()
public void setParsingResult(ParsingResult result)
public void refreshConnectionStatus()
public java.lang.String getText()
public java.lang.String getSelectedText()
public int getOrientation()
public java.lang.String getTargetText()
public int getSQLType()
public void addConnectionProfileAttachListener(IConnectionProfileAttachListener listener)
public void removeConnectionProfileAttachListener(IConnectionProfileAttachListener listener)
public void fireConnectionProfileAttached()
public DatabaseIdentifier getDatabaseIdentifier()
public java.lang.String getDBType()
public void insert(java.lang.String sqlText)
sqlText
- public boolean isConnected()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |