Search in sources :

Example 1 with PropertySourceCustom

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

the class StreamConsumerPageSettings method activatePage.

@Override
public void activatePage() {
    final StreamConsumerSettings settings = getWizard().getPageSettings(this, StreamConsumerSettings.class);
    DataTransferProcessorDescriptor processor = getWizard().getSettings().getProcessor();
    propertySource = new PropertySourceCustom(processor.getProperties(), getWizard().getSettings().getProcessorProperties());
    propsEditor.loadProperties(propertySource);
    switch(settings.getLobExtractType()) {
        case SKIP:
            lobExtractType.select(EXTRACT_LOB_SKIP);
            break;
        case FILES:
            lobExtractType.select(EXTRACT_LOB_FILES);
            break;
        case INLINE:
            lobExtractType.select(EXTRACT_LOB_INLINE);
            break;
    }
    switch(settings.getLobEncoding()) {
        case BASE64:
            lobEncodingCombo.select(LOB_ENCODING_BASE64);
            break;
        case HEX:
            lobEncodingCombo.select(LOB_ENCODING_HEX);
            break;
        case BINARY:
            lobEncodingCombo.select(LOB_ENCODING_BINARY);
            break;
    }
    updatePageCompletion();
}
Also used : PropertySourceCustom(org.jkiss.dbeaver.runtime.properties.PropertySourceCustom) DataTransferProcessorDescriptor(org.jkiss.dbeaver.registry.transfer.DataTransferProcessorDescriptor)

Example 2 with PropertySourceCustom

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

the class PrefPageDataFormat method reloadFormatter.

private void reloadFormatter() {
    DataFormatterDescriptor formatterDescriptor = getCurrentFormatter();
    if (formatterDescriptor == null) {
        return;
    }
    Map<Object, Object> formatterProps = profileProperties.get(formatterDescriptor.getId());
    Map<Object, 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 3 with PropertySourceCustom

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

the class StreamPOIConsumerPageSettings method activatePage.

@Override
public void activatePage() {
    final StreamConsumerSettings settings = getWizard().getPageSettings(this, StreamConsumerSettings.class);
    DataTransferProcessorDescriptor processor = getWizard().getSettings().getProcessor();
    propertySource = new PropertySourceCustom(processor.getProperties(), getWizard().getSettings().getProcessorProperties());
    propsEditor.loadProperties(propertySource);
    updatePageCompletion();
}
Also used : StreamConsumerSettings(org.jkiss.dbeaver.tools.transfer.stream.StreamConsumerSettings) PropertySourceCustom(org.jkiss.dbeaver.runtime.properties.PropertySourceCustom) DataTransferProcessorDescriptor(org.jkiss.dbeaver.registry.transfer.DataTransferProcessorDescriptor)

Example 4 with PropertySourceCustom

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

the class MockDataSettings method putGenerator.

private void putGenerator(AttributeGeneratorProperties generatorProperties, MockGeneratorDescriptor generator) {
    generatorDescriptors.put(generator.getId(), generator);
    generatorProperties.putGeneratorPropertySource(generator.getId(), new PropertySourceCustom(generator.getProperties(), null));
}
Also used : PropertySourceCustom(org.jkiss.dbeaver.runtime.properties.PropertySourceCustom)

Example 5 with PropertySourceCustom

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

the class StreamProducerPageSettings method activatePage.

@Override
public void activatePage() {
    // Initialize property editor
    DataTransferProcessorDescriptor processor = getProducerProcessor();
    DBPPropertyDescriptor[] properties = processor == null ? new DBPPropertyDescriptor[0] : processor.getProperties();
    propertySource = new PropertySourceCustom(properties, getWizard().getSettings().getProcessorProperties());
    propsEditor.loadProperties(propertySource);
    // Init pipes
    reloadPipes();
    updatePageCompletion();
    UIUtils.asyncExec(() -> UIUtils.packColumns(filesTable, true));
}
Also used : PropertySourceCustom(org.jkiss.dbeaver.runtime.properties.PropertySourceCustom) DataTransferProcessorDescriptor(org.jkiss.dbeaver.tools.transfer.registry.DataTransferProcessorDescriptor) DBPPropertyDescriptor(org.jkiss.dbeaver.model.preferences.DBPPropertyDescriptor)

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