Search in sources :

Example 6 with StringEditorInput

use of org.jkiss.dbeaver.ui.editors.StringEditorInput in project dbeaver by serge-rider.

the class OpenHandler method openSQLConsole.

public static SQLEditor openSQLConsole(IWorkbenchWindow workbenchWindow, DBPDataSourceContainer dataSourceContainer, String name, String sqlText) {
    StringEditorInput sqlInput = new StringEditorInput(name, sqlText, false, GeneralUtils.DEFAULT_ENCODING);
    EditorUtils.setInputDataSource(sqlInput, dataSourceContainer, false);
    return openSQLEditor(workbenchWindow, sqlInput);
}
Also used : StringEditorInput(org.jkiss.dbeaver.ui.editors.StringEditorInput)

Aggregations

StringEditorInput (org.jkiss.dbeaver.ui.editors.StringEditorInput)6 InputStream (java.io.InputStream)2 StyledText (org.eclipse.swt.custom.StyledText)2 FillLayout (org.eclipse.swt.layout.FillLayout)2 GridData (org.eclipse.swt.layout.GridData)2 SubEditorSite (org.jkiss.dbeaver.ui.editors.SubEditorSite)2 SQLEditorBase (org.jkiss.dbeaver.ui.editors.sql.SQLEditorBase)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 IFile (org.eclipse.core.resources.IFile)1 DisposeEvent (org.eclipse.swt.events.DisposeEvent)1 DisposeListener (org.eclipse.swt.events.DisposeListener)1 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)1 SelectionEvent (org.eclipse.swt.events.SelectionEvent)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 IEditorSite (org.eclipse.ui.IEditorSite)1 PartInitException (org.eclipse.ui.PartInitException)1 NotNull (org.jkiss.code.NotNull)1 DBException (org.jkiss.dbeaver.DBException)1 DBPDataSource (org.jkiss.dbeaver.model.DBPDataSource)1 DBPDataSourceContainer (org.jkiss.dbeaver.model.DBPDataSourceContainer)1