Search in sources :

Example 6 with IDatabaseEditorInput

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

the class ProgressEditorPart method createProgressPane.

private void createProgressPane(final Composite parent) {
    progressCanvas = new Canvas(parent, SWT.NONE);
    progressCanvas.addPaintListener(new PaintListener() {

        @Override
        public void paintControl(PaintEvent e) {
            e.gc.drawText("Connecting to datasource '" + getEditorInput().getDatabaseObject().getName() + "'...", 5, 5, true);
        }
    });
    InitNodeService loadingService = new InitNodeService();
    LoadingJob<IDatabaseEditorInput> loadJob = LoadingJob.createService(loadingService, new InitNodeVisualizer(loadingService));
    loadJob.schedule();
}
Also used : IDatabaseEditorInput(org.jkiss.dbeaver.ui.editors.IDatabaseEditorInput) PaintEvent(org.eclipse.swt.events.PaintEvent) PaintListener(org.eclipse.swt.events.PaintListener) Canvas(org.eclipse.swt.widgets.Canvas)

Aggregations

IDatabaseEditorInput (org.jkiss.dbeaver.ui.editors.IDatabaseEditorInput)6 IEditorPart (org.eclipse.ui.IEditorPart)4 DBNDatabaseNode (org.jkiss.dbeaver.model.navigator.DBNDatabaseNode)3 IEditorReference (org.eclipse.ui.IEditorReference)2 DBPDataSource (org.jkiss.dbeaver.model.DBPDataSource)2 DBNNode (org.jkiss.dbeaver.model.navigator.DBNNode)2 DBSObject (org.jkiss.dbeaver.model.struct.DBSObject)2 IDatabaseEditor (org.jkiss.dbeaver.ui.editors.IDatabaseEditor)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 IFile (org.eclipse.core.resources.IFile)1 ISelection (org.eclipse.jface.viewers.ISelection)1 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 PaintEvent (org.eclipse.swt.events.PaintEvent)1 PaintListener (org.eclipse.swt.events.PaintListener)1 Canvas (org.eclipse.swt.widgets.Canvas)1 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)1 IWorkbenchPart (org.eclipse.ui.IWorkbenchPart)1 NotNull (org.jkiss.code.NotNull)1 DBPDataSourceContainer (org.jkiss.dbeaver.model.DBPDataSourceContainer)1 IDataSourceContainerProvider (org.jkiss.dbeaver.model.IDataSourceContainerProvider)1