Search in sources :

Example 1 with DialogSettingsMap

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

the class DataTransferWizard method saveDialogSettings.

// Saves wizard settings in UI dialog settings
private void saveDialogSettings() {
    // Save settings
    DialogSettingsMap dialogSettings = new DialogSettingsMap(getDialogSettings());
    saveConfiguration(dialogSettings);
    DTUIActivator.getDefault().saveDialogSettings();
}
Also used : DialogSettingsMap(org.jkiss.dbeaver.ui.DialogSettingsMap)

Example 2 with DialogSettingsMap

use of org.jkiss.dbeaver.ui.DialogSettingsMap in project dbeaver by dbeaver.

the class DataTransferWizard method saveDialogSettings.

// Saves wizard settings in UI dialog settings
private void saveDialogSettings() {
    // Save settings
    DialogSettingsMap dialogSettings = new DialogSettingsMap(getDialogSettings());
    saveConfiguration(dialogSettings);
    DTUIActivator.getDefault().saveDialogSettings();
}
Also used : DialogSettingsMap(org.jkiss.dbeaver.ui.DialogSettingsMap)

Example 3 with DialogSettingsMap

use of org.jkiss.dbeaver.ui.DialogSettingsMap in project dbeaver by dbeaver.

the class DataTransferWizard method openWizard.

public static void openWizard(@NotNull IWorkbenchWindow workbenchWindow, @Nullable Collection<IDataTransferProducer> producers, @Nullable Collection<IDataTransferConsumer> consumers, @Nullable IStructuredSelection selection) {
    try {
        DataTransferSettings settings = DataTransferSettings.loadSettings(new DBRRunnableWithResult<DataTransferSettings>() {

            @Override
            public void run(DBRProgressMonitor monitor) {
                result = new DataTransferSettings(monitor, producers, consumers, new DialogSettingsMap(getWizardDialogSettings()), new DataTransferState(), true, CommonUtils.isEmpty(consumers), false);
            }
        });
        DataTransferWizard wizard = new DataTransferWizard(null, settings, true);
        TaskConfigurationWizardDialog dialog = new TaskConfigurationWizardDialog(workbenchWindow, wizard, selection);
        dialog.open();
    } catch (DBException e) {
        DBWorkbench.getPlatformUI().showError("Data transfer error", "Can not open data transfer wizard", e);
    }
}
Also used : DBException(org.jkiss.dbeaver.DBException) TaskConfigurationWizardDialog(org.jkiss.dbeaver.tasks.ui.wizard.TaskConfigurationWizardDialog) DBRProgressMonitor(org.jkiss.dbeaver.model.runtime.DBRProgressMonitor) DialogSettingsMap(org.jkiss.dbeaver.ui.DialogSettingsMap)

Example 4 with DialogSettingsMap

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

the class DataTransferWizard method openWizard.

public static void openWizard(@NotNull IWorkbenchWindow workbenchWindow, @Nullable Collection<IDataTransferProducer> producers, @Nullable Collection<IDataTransferConsumer> consumers, @Nullable IStructuredSelection selection) {
    try {
        DataTransferSettings settings = DataTransferSettings.loadSettings(new DBRRunnableWithResult<DataTransferSettings>() {

            @Override
            public void run(DBRProgressMonitor monitor) {
                result = new DataTransferSettings(monitor, producers, consumers, new DialogSettingsMap(getWizardDialogSettings()), new DataTransferState(), true, CommonUtils.isEmpty(consumers), false);
            }
        });
        DataTransferWizard wizard = new DataTransferWizard(null, settings, true);
        TaskConfigurationWizardDialog dialog = new TaskConfigurationWizardDialog(workbenchWindow, wizard, selection);
        dialog.open();
    } catch (DBException e) {
        DBWorkbench.getPlatformUI().showError("Data transfer error", "Can not open data transfer wizard", e);
    }
}
Also used : DBException(org.jkiss.dbeaver.DBException) TaskConfigurationWizardDialog(org.jkiss.dbeaver.tasks.ui.wizard.TaskConfigurationWizardDialog) DBRProgressMonitor(org.jkiss.dbeaver.model.runtime.DBRProgressMonitor) DialogSettingsMap(org.jkiss.dbeaver.ui.DialogSettingsMap)

Aggregations

DialogSettingsMap (org.jkiss.dbeaver.ui.DialogSettingsMap)4 DBException (org.jkiss.dbeaver.DBException)2 DBRProgressMonitor (org.jkiss.dbeaver.model.runtime.DBRProgressMonitor)2 TaskConfigurationWizardDialog (org.jkiss.dbeaver.tasks.ui.wizard.TaskConfigurationWizardDialog)2