use of org.jkiss.dbeaver.ui.controls.SelectDataSourceCombo in project dbeaver by serge-rider.
the class DatabaseDebugConfigurationTab method createConnectionSettingsGroup.
protected void createConnectionSettingsGroup(Composite composite) {
Group group = UIUtils.createControlGroup(composite, DebugUIMessages.DatabaseTab_connection_group_text, 4, GridData.FILL_HORIZONTAL, SWT.DEFAULT);
UIUtils.createControlLabel(group, DebugUIMessages.DatabaseTab_datasource_label_text);
connectionCombo = new SelectDataSourceCombo(group) {
@Override
protected void onDataSourceChange(DBPDataSourceContainer dataSource) {
String driverName = dataSource == null ? "" : dataSource.getDriver().getFullName();
driverText.setText(driverName);
setDirty(true);
loadConnectionDebugTypes();
updateLaunchConfigurationDialog();
}
};
connectionCombo.addItem(null);
for (DBPDataSourceContainer ds : DataSourceRegistry.getAllDataSources()) {
connectionCombo.addItem(ds);
}
driverText = UIUtils.createLabelText(group, DebugUIMessages.DatabaseTab_driver_label_text, "", SWT.READ_ONLY);
}
use of org.jkiss.dbeaver.ui.controls.SelectDataSourceCombo in project dbeaver by dbeaver.
the class DatabaseDebugConfigurationTab method createConnectionSettingsGroup.
protected void createConnectionSettingsGroup(Composite composite) {
Group group = UIUtils.createControlGroup(composite, DebugUIMessages.DatabaseTab_connection_group_text, 4, GridData.FILL_HORIZONTAL, SWT.DEFAULT);
UIUtils.createControlLabel(group, DebugUIMessages.DatabaseTab_datasource_label_text);
connectionCombo = new SelectDataSourceCombo(group) {
@Override
protected void onDataSourceChange(DBPDataSourceContainer dataSource) {
String driverName = dataSource == null ? "" : dataSource.getDriver().getFullName();
driverText.setText(driverName);
setDirty(true);
loadConnectionDebugTypes();
updateLaunchConfigurationDialog();
}
};
connectionCombo.addItem(null);
for (DBPDataSourceContainer ds : DataSourceRegistry.getAllDataSources()) {
connectionCombo.addItem(ds);
}
driverText = UIUtils.createLabelText(group, DebugUIMessages.DatabaseTab_driver_label_text, "", SWT.READ_ONLY);
}
Aggregations