Search in sources :

Example 1 with SelectDataSourceCombo

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);
}
Also used : SelectDataSourceCombo(org.jkiss.dbeaver.ui.controls.SelectDataSourceCombo) DBPDataSourceContainer(org.jkiss.dbeaver.model.DBPDataSourceContainer)

Example 2 with SelectDataSourceCombo

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);
}
Also used : SelectDataSourceCombo(org.jkiss.dbeaver.ui.controls.SelectDataSourceCombo) DBPDataSourceContainer(org.jkiss.dbeaver.model.DBPDataSourceContainer)

Aggregations

DBPDataSourceContainer (org.jkiss.dbeaver.model.DBPDataSourceContainer)2 SelectDataSourceCombo (org.jkiss.dbeaver.ui.controls.SelectDataSourceCombo)2