Search in sources :

Example 21 with PropertySourceCustom

use of org.jkiss.dbeaver.runtime.properties.PropertySourceCustom in project dbeaver by dbeaver.

the class PrefPageDataFormat method reloadFormatter.

private void reloadFormatter() {
    DataFormatterDescriptor formatterDescriptor = getCurrentFormatter();
    if (formatterDescriptor == null) {
        return;
    }
    Map<String, Object> formatterProps = profileProperties.get(formatterDescriptor.getId());
    Map<String, Object> defaultProps = formatterDescriptor.getSample().getDefaultProperties(localeSelector.getSelectedLocale());
    propertySource = new PropertySourceCustom(formatterDescriptor.getProperties(), formatterProps);
    propertySource.setDefaultValues(defaultProps);
    propertiesControl.loadProperties(propertySource);
    reloadSample();
}
Also used : PropertySourceCustom(org.jkiss.dbeaver.runtime.properties.PropertySourceCustom) DataFormatterDescriptor(org.jkiss.dbeaver.registry.formatter.DataFormatterDescriptor)

Example 22 with PropertySourceCustom

use of org.jkiss.dbeaver.runtime.properties.PropertySourceCustom in project dbeaver by dbeaver.

the class DriverEditDialog method createParametersTab.

private void createParametersTab(TabFolder group) {
    Composite paramsGroup = new Composite(group, SWT.NONE);
    paramsGroup.setLayout(new GridLayout(1, false));
    parametersEditor = new PropertyTreeViewer(paramsGroup, SWT.BORDER);
    driverPropertySource = new PropertySourceCustom(driver.getProviderDescriptor().getDriverProperties(), driver.getDriverParameters());
    driverPropertySource.addDefaultValues(driver.getDefaultDriverParameters());
    parametersEditor.loadProperties(driverPropertySource);
    TabItem paramsTab = new TabItem(group, SWT.NONE);
    paramsTab.setText(UIConnectionMessages.dialog_edit_driver_tab_name_advanced_parameters);
    paramsTab.setToolTipText(UIConnectionMessages.dialog_edit_driver_tab_tooltip_advanced_parameters);
    paramsTab.setControl(paramsGroup);
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) PropertySourceCustom(org.jkiss.dbeaver.runtime.properties.PropertySourceCustom) PropertyTreeViewer(org.jkiss.dbeaver.ui.properties.PropertyTreeViewer)

Aggregations

PropertySourceCustom (org.jkiss.dbeaver.runtime.properties.PropertySourceCustom)22 DataFormatterDescriptor (org.jkiss.dbeaver.registry.formatter.DataFormatterDescriptor)4 DataTransferProcessorDescriptor (org.jkiss.dbeaver.tools.transfer.registry.DataTransferProcessorDescriptor)4 DataTransferProcessorDescriptor (org.jkiss.dbeaver.registry.transfer.DataTransferProcessorDescriptor)3 StreamConsumerSettings (org.jkiss.dbeaver.tools.transfer.stream.StreamConsumerSettings)3 IDialogSettings (org.eclipse.jface.dialogs.IDialogSettings)2 GridLayout (org.eclipse.swt.layout.GridLayout)2 PostgreForeignTableManager (org.jkiss.dbeaver.ext.postgresql.edit.PostgreForeignTableManager)2 PostgreTableColumnManager (org.jkiss.dbeaver.ext.postgresql.edit.PostgreTableColumnManager)2 DBPDataSourceContainer (org.jkiss.dbeaver.model.DBPDataSourceContainer)2 DBECommandContext (org.jkiss.dbeaver.model.edit.DBECommandContext)2 DBEPersistAction (org.jkiss.dbeaver.model.edit.DBEPersistAction)2 PropertyDescriptor (org.jkiss.dbeaver.model.impl.PropertyDescriptor)2 SQLDatabasePersistAction (org.jkiss.dbeaver.model.impl.edit.SQLDatabasePersistAction)2 SQLDatabasePersistActionComment (org.jkiss.dbeaver.model.impl.edit.SQLDatabasePersistActionComment)2 DBNDatabaseNode (org.jkiss.dbeaver.model.navigator.DBNDatabaseNode)2 DBPPropertyDescriptor (org.jkiss.dbeaver.model.preferences.DBPPropertyDescriptor)2 DBSEntity (org.jkiss.dbeaver.model.struct.DBSEntity)2 DBSEntityAttribute (org.jkiss.dbeaver.model.struct.DBSEntityAttribute)2 DBVTransformSettings (org.jkiss.dbeaver.model.virtual.DBVTransformSettings)2