use of org.jkiss.dbeaver.tasks.ui.wizard.TaskWizardExecutor in project dbeaver by dbeaver.
the class AbstractNativeToolWizard method performFinish.
@Override
public boolean performFinish() {
// Save settings
settings.saveSettings(getRunnableContext(), getPreferenceStore());
if (!validateClientFiles()) {
return false;
}
if (getCurrentTask() != null) {
return super.performFinish();
}
showLogPage();
try {
// Execute directly - without task serialize/deserialize
// We need it because some data producers cannot be serialized properly (e.g. ResultSetDatacontainer - see #7342)
DBTTask temporaryTask = getProject().getTaskManager().createTemporaryTask(getTaskType(), getTaskType().getName());
saveConfigurationToTask(temporaryTask);
TaskWizardExecutor executor = new TaskWizardExecutor(getRunnableContext(), temporaryTask, log, logPage.getLogWriter());
executor.executeTask();
return false;
} catch (Exception e) {
DBWorkbench.getPlatformUI().showError(e.getMessage(), "Error running task", e);
return false;
}
}
use of org.jkiss.dbeaver.tasks.ui.wizard.TaskWizardExecutor in project dbeaver by serge-rider.
the class SQLToolTaskWizard method performFinish.
@Override
public boolean performFinish() {
if (isRunTaskOnFinish()) {
// Only if task is not temporary
saveConfigurationToTask(getCurrentTask());
return super.performFinish();
}
try {
// Execute task in wizard
DBTTask task = getCurrentTask();
saveConfigurationToTask(task);
pageStatus.clearLog();
getContainer().showPage(pageStatus);
TaskWizardExecutor executor = new SQLTaskExecutor(task);
executor.executeTask();
if (taskHandler.needsRefreshOnFinish()) {
refreshOnFinish();
}
return false;
} catch (Exception e) {
DBWorkbench.getPlatformUI().showError(e.getMessage(), TasksSQLUIMessages.sql_tool_task_wizard_message_error_running_task, e);
return false;
}
}
use of org.jkiss.dbeaver.tasks.ui.wizard.TaskWizardExecutor in project dbeaver by serge-rider.
the class AbstractNativeToolWizard method performFinish.
@Override
public boolean performFinish() {
// Save settings
settings.saveSettings(getRunnableContext(), getPreferenceStore());
if (!validateClientFiles()) {
return false;
}
if (getCurrentTask() != null) {
return super.performFinish();
}
showLogPage();
try {
// Execute directly - without task serialize/deserialize
// We need it because some data producers cannot be serialized properly (e.g. ResultSetDatacontainer - see #7342)
DBTTask temporaryTask = getProject().getTaskManager().createTemporaryTask(getTaskType(), getTaskType().getName());
saveConfigurationToTask(temporaryTask);
TaskWizardExecutor executor = new TaskWizardExecutor(getRunnableContext(), temporaryTask, log, logPage.getLogWriter());
executor.executeTask();
return false;
} catch (Exception e) {
DBWorkbench.getPlatformUI().showError(e.getMessage(), "Error running task", e);
return false;
}
}
use of org.jkiss.dbeaver.tasks.ui.wizard.TaskWizardExecutor in project dbeaver by dbeaver.
the class SQLToolTaskWizard method performFinish.
@Override
public boolean performFinish() {
if (isRunTaskOnFinish()) {
// Only if task is not temporary
saveConfigurationToTask(getCurrentTask());
return super.performFinish();
}
try {
// Execute task in wizard
DBTTask task = getCurrentTask();
saveConfigurationToTask(task);
pageStatus.clearLog();
getContainer().showPage(pageStatus);
TaskWizardExecutor executor = new SQLTaskExecutor(task);
executor.executeTask();
if (taskHandler.needsRefreshOnFinish()) {
refreshOnFinish();
}
return false;
} catch (Exception e) {
DBWorkbench.getPlatformUI().showError(e.getMessage(), TasksSQLUIMessages.sql_tool_task_wizard_message_error_running_task, e);
return false;
}
}
Aggregations