Search in sources :

Example 1 with MigrateConnectionWizard

use of org.jkiss.dbeaver.ui.dialogs.connection.MigrateConnectionWizard in project dbeaver by serge-rider.

the class NavigatorHandlerConnectionMigrate method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
    final ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
    ActiveWizardDialog dialog = new ActiveWizardDialog(window, new MigrateConnectionWizard(DBeaverCore.getInstance().getProjectRegistry().getActiveDataSourceRegistry(), currentSelection instanceof IStructuredSelection ? (IStructuredSelection) currentSelection : null));
    dialog.open();
    return null;
}
Also used : IWorkbenchWindow(org.eclipse.ui.IWorkbenchWindow) ActiveWizardDialog(org.jkiss.dbeaver.ui.dialogs.ActiveWizardDialog) ISelection(org.eclipse.jface.viewers.ISelection) MigrateConnectionWizard(org.jkiss.dbeaver.ui.dialogs.connection.MigrateConnectionWizard) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection)

Aggregations

ISelection (org.eclipse.jface.viewers.ISelection)1 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)1 ActiveWizardDialog (org.jkiss.dbeaver.ui.dialogs.ActiveWizardDialog)1 MigrateConnectionWizard (org.jkiss.dbeaver.ui.dialogs.connection.MigrateConnectionWizard)1