Search in sources :

Example 6 with ToolWizardDialog

use of org.jkiss.dbeaver.ui.dialogs.tools.ToolWizardDialog in project dbeaver by serge-rider.

the class PostgreToolBackup method execute.

@Override
public void execute(IWorkbenchWindow window, IWorkbenchPart activePart, Collection<DBSObject> objects) throws DBException {
    ToolWizardDialog dialog = new ToolWizardDialog(window, new PostgreBackupWizard(objects));
    dialog.open();
}
Also used : ToolWizardDialog(org.jkiss.dbeaver.ui.dialogs.tools.ToolWizardDialog)

Example 7 with ToolWizardDialog

use of org.jkiss.dbeaver.ui.dialogs.tools.ToolWizardDialog in project dbeaver by serge-rider.

the class PostgreToolRestore method execute.

@Override
public void execute(IWorkbenchWindow window, IWorkbenchPart activePart, Collection<DBSObject> objects) throws DBException {
    for (DBSObject object : objects) {
        PostgreDatabase database;
        if (object instanceof PostgreSchema) {
            database = ((PostgreSchema) object).getDatabase();
        } else if (object instanceof PostgreDatabase) {
            database = (PostgreDatabase) object;
        } else {
            continue;
        }
        ToolWizardDialog dialog = new ToolWizardDialog(window, new PostgreRestoreWizard(database));
        dialog.open();
    }
}
Also used : DBSObject(org.jkiss.dbeaver.model.struct.DBSObject) ToolWizardDialog(org.jkiss.dbeaver.ui.dialogs.tools.ToolWizardDialog) PostgreDatabase(org.jkiss.dbeaver.ext.postgresql.model.PostgreDatabase) PostgreSchema(org.jkiss.dbeaver.ext.postgresql.model.PostgreSchema)

Aggregations

ToolWizardDialog (org.jkiss.dbeaver.ui.dialogs.tools.ToolWizardDialog)7 DBSObject (org.jkiss.dbeaver.model.struct.DBSObject)5 MySQLCatalog (org.jkiss.dbeaver.ext.mysql.model.MySQLCatalog)2 PostgreSchema (org.jkiss.dbeaver.ext.postgresql.model.PostgreSchema)2 OracleDataSource (org.jkiss.dbeaver.ext.oracle.model.OracleDataSource)1 PostgreDatabase (org.jkiss.dbeaver.ext.postgresql.model.PostgreDatabase)1