Search in sources :

Example 6 with DBTTaskConfigurator

use of org.jkiss.dbeaver.tasks.ui.DBTTaskConfigurator 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

DBTTaskConfigurator (org.jkiss.dbeaver.tasks.ui.DBTTaskConfigurator)6 ISelection (org.eclipse.jface.viewers.ISelection)2 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)2 IWorkbenchPart (org.eclipse.ui.IWorkbenchPart)2 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)2 DBException (org.jkiss.dbeaver.DBException)2 DBTTask (org.jkiss.dbeaver.model.task.DBTTask)2 TaskTypeDescriptor (org.jkiss.dbeaver.registry.task.TaskTypeDescriptor)2 DBTTaskConfigPanel (org.jkiss.dbeaver.tasks.ui.DBTTaskConfigPanel)2