Search in sources :

Example 6 with DBPDataFormatterRegistry

use of org.jkiss.dbeaver.model.app.DBPDataFormatterRegistry in project dbeaver by serge-rider.

the class StreamConsumerPageSettings method reloadFormatProfiles.

private void reloadFormatProfiles() {
    DBPDataFormatterRegistry registry = DBWorkbench.getPlatform().getDataFormatterRegistry();
    formatProfilesCombo.removeAll();
    formatProfilesCombo.add(DTMessages.data_transfer_wizard_settings_listbox_formatting_item_default);
    for (DBDDataFormatterProfile profile : registry.getCustomProfiles()) {
        formatProfilesCombo.add(profile.getProfileName());
    }
    final StreamConsumerSettings settings = getWizard().getPageSettings(this, StreamConsumerSettings.class);
    DBDDataFormatterProfile formatterProfile = settings.getFormatterProfile();
    if (formatterProfile != null) {
        if (!UIUtils.setComboSelection(formatProfilesCombo, formatterProfile.getProfileName())) {
            formatProfilesCombo.select(0);
        }
    } else {
        formatProfilesCombo.select(0);
    }
}
Also used : StreamConsumerSettings(org.jkiss.dbeaver.tools.transfer.stream.StreamConsumerSettings) DBPDataFormatterRegistry(org.jkiss.dbeaver.model.app.DBPDataFormatterRegistry) DBDDataFormatterProfile(org.jkiss.dbeaver.model.data.DBDDataFormatterProfile)

Aggregations

DBPDataFormatterRegistry (org.jkiss.dbeaver.model.app.DBPDataFormatterRegistry)6 StreamConsumerSettings (org.jkiss.dbeaver.tools.transfer.stream.StreamConsumerSettings)4 PreferenceDialog (org.eclipse.jface.preference.PreferenceDialog)2 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)2 SelectionEvent (org.eclipse.swt.events.SelectionEvent)2 GridData (org.eclipse.swt.layout.GridData)2 GridLayout (org.eclipse.swt.layout.GridLayout)2 Combo (org.eclipse.swt.widgets.Combo)2 Composite (org.eclipse.swt.widgets.Composite)2 DBDDataFormatterProfile (org.jkiss.dbeaver.model.data.DBDDataFormatterProfile)2 PropertyTreeViewer (org.jkiss.dbeaver.ui.properties.PropertyTreeViewer)2