Search in sources :

Example 1 with DBTTaskConfigPanel

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

the class TaskConfigurationWizardPageSettings method createTaskSettingsUI.

private void createTaskSettingsUI() {
    UIUtils.disposeChildControls(taskSettingsPlaceholder);
    if (curTaskType != null && TaskUIRegistry.getInstance().supportsConfigurator(curTaskType)) {
        try {
            DBTTaskConfigurator configurator = TaskUIRegistry.getInstance().createConfigurator(curTaskType);
            DBTTaskConfigPanel configPage = configurator.createInputConfigurator(UIUtils.getDefaultRunnableContext(), curTaskType);
            if (configPage != null) {
                taskConfigPanel = configPage;
                TaskConfigurationWizard taskWizard = getTaskPage().getTaskWizard();
                taskConfigPanel.createControl(taskSettingsPlaceholder, taskWizard, this::updatePageCompletion);
                if (getWizard().getCurrentTask() != null) {
                    taskConfigPanel.loadSettings();
                }
                taskSettingsPlaceholder.layout(true, true);
            }
        } catch (Exception e) {
            DBWorkbench.getPlatformUI().showError("Task configurator error", "Error creating task configuration UI", e);
        }
    }
}
Also used : DBTTaskConfigPanel(org.jkiss.dbeaver.tasks.ui.DBTTaskConfigPanel) DBTTaskConfigurator(org.jkiss.dbeaver.tasks.ui.DBTTaskConfigurator)

Example 2 with DBTTaskConfigPanel

use of org.jkiss.dbeaver.tasks.ui.DBTTaskConfigPanel in project dbeaver by dbeaver.

the class TaskConfigurationWizardPageSettings method createTaskSettingsUI.

private void createTaskSettingsUI() {
    UIUtils.disposeChildControls(taskSettingsPlaceholder);
    if (curTaskType != null && TaskUIRegistry.getInstance().supportsConfigurator(curTaskType)) {
        try {
            DBTTaskConfigurator configurator = TaskUIRegistry.getInstance().createConfigurator(curTaskType);
            DBTTaskConfigPanel configPage = configurator.createInputConfigurator(UIUtils.getDefaultRunnableContext(), curTaskType);
            if (configPage != null) {
                taskConfigPanel = configPage;
                TaskConfigurationWizard taskWizard = getTaskPage().getTaskWizard();
                taskConfigPanel.createControl(taskSettingsPlaceholder, taskWizard, this::updatePageCompletion);
                if (getWizard().getCurrentTask() != null) {
                    taskConfigPanel.loadSettings();
                }
                taskSettingsPlaceholder.layout(true, true);
            }
        } catch (Exception e) {
            DBWorkbench.getPlatformUI().showError("Task configurator error", "Error creating task configuration UI", e);
        }
    }
}
Also used : DBTTaskConfigPanel(org.jkiss.dbeaver.tasks.ui.DBTTaskConfigPanel) DBTTaskConfigurator(org.jkiss.dbeaver.tasks.ui.DBTTaskConfigurator)

Aggregations

DBTTaskConfigPanel (org.jkiss.dbeaver.tasks.ui.DBTTaskConfigPanel)2 DBTTaskConfigurator (org.jkiss.dbeaver.tasks.ui.DBTTaskConfigurator)2