use of org.jkiss.dbeaver.ui.LoadingJob in project dbeaver by dbeaver.
the class SQLToolTaskWizardPageStatus method createControl.
@Override
public void createControl(Composite parent) {
Composite composite = new Composite(parent, SWT.BORDER);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
composite.setLayout(new FillLayout());
SashForm partDivider = new SashForm(composite, SWT.VERTICAL);
partDivider.setSashWidth(5);
statusTable = new ObjectListControl<SQLToolStatistics>(partDivider, SWT.SHEET, new ListContentProvider()) {
@NotNull
@Override
protected String getListConfigId(List<Class<?>> classList) {
return "SQLToolStatus." + getWizard().getTaskType().getId();
}
@Override
protected DBPImage getObjectImage(SQLToolStatistics item) {
return DBValueFormatting.getObjectImage(item.getObject());
}
@Override
protected LoadingJob<Collection<SQLToolStatistics>> createLoadService() {
return LoadingJob.createService(new DummyLoadService(), new ObjectsLoadVisualizer());
}
};
console = new MessageConsole(TasksSQLUIMessages.sql_tool_task_wizard_page_status_message_console_name_tool_log, null);
LogConsoleViewer consoleViewer = new LogConsoleViewer(partDivider);
console.setWaterMarks(1024 * 1024 * 3, 1024 * 1024 * 4);
try {
writer = new PrintStream(console.newMessageStream(), true, StandardCharsets.UTF_8.name());
} catch (UnsupportedEncodingException e) {
writer = new PrintStream(console.newMessageStream(), true);
}
setControl(composite);
}
use of org.jkiss.dbeaver.ui.LoadingJob in project dbeaver by serge-rider.
the class SQLToolTaskWizardPageStatus method createControl.
@Override
public void createControl(Composite parent) {
Composite composite = new Composite(parent, SWT.BORDER);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
composite.setLayout(new FillLayout());
SashForm partDivider = new SashForm(composite, SWT.VERTICAL);
partDivider.setSashWidth(5);
statusTable = new ObjectListControl<SQLToolStatistics>(partDivider, SWT.SHEET, new ListContentProvider()) {
@NotNull
@Override
protected String getListConfigId(List<Class<?>> classList) {
return "SQLToolStatus." + getWizard().getTaskType().getId();
}
@Override
protected DBPImage getObjectImage(SQLToolStatistics item) {
return DBValueFormatting.getObjectImage(item.getObject());
}
@Override
protected LoadingJob<Collection<SQLToolStatistics>> createLoadService() {
return LoadingJob.createService(new DummyLoadService(), new ObjectsLoadVisualizer());
}
};
console = new MessageConsole(TasksSQLUIMessages.sql_tool_task_wizard_page_status_message_console_name_tool_log, null);
LogConsoleViewer consoleViewer = new LogConsoleViewer(partDivider);
console.setWaterMarks(1024 * 1024 * 3, 1024 * 1024 * 4);
try {
writer = new PrintStream(console.newMessageStream(), true, StandardCharsets.UTF_8.name());
} catch (UnsupportedEncodingException e) {
writer = new PrintStream(console.newMessageStream(), true);
}
setControl(composite);
}
Aggregations