Search in sources :

Example 6 with BundlePreferenceStore

use of org.jkiss.dbeaver.model.impl.preferences.BundlePreferenceStore in project dbeaver by serge-rider.

the class GISViewerActivator method start.

@Override
public void start(BundleContext context) throws Exception {
    super.start(context);
    plugin = this;
    preferences = new BundlePreferenceStore(getBundle());
}
Also used : BundlePreferenceStore(org.jkiss.dbeaver.model.impl.preferences.BundlePreferenceStore)

Example 7 with BundlePreferenceStore

use of org.jkiss.dbeaver.model.impl.preferences.BundlePreferenceStore in project dbeaver by serge-rider.

the class GISViewerPreferencesInitializer method initializeDefaultPreferences.

@Override
public void initializeDefaultPreferences() {
    // Init default preferences
    DBPPreferenceStore store = new BundlePreferenceStore(GISViewerActivator.getDefault().getBundle());
    // View settings
    PrefUtils.setDefaultPreferenceValue(store, GeometryViewerConstants.PREF_MAX_OBJECTS_RENDER, GeometryViewerConstants.DEFAULT_MAX_OBJECTS_RENDER);
    PrefUtils.setDefaultPreferenceValue(store, GeometryViewerConstants.PREF_DEFAULT_SRID, GisConstants.SRID_4326);
}
Also used : BundlePreferenceStore(org.jkiss.dbeaver.model.impl.preferences.BundlePreferenceStore) DBPPreferenceStore(org.jkiss.dbeaver.model.preferences.DBPPreferenceStore)

Example 8 with BundlePreferenceStore

use of org.jkiss.dbeaver.model.impl.preferences.BundlePreferenceStore in project dbeaver by serge-rider.

the class SQLEditorActivator method start.

@Override
public void start(BundleContext context) throws Exception {
    super.start(context);
    plugin = this;
    preferences = new BundlePreferenceStore(getBundle());
}
Also used : BundlePreferenceStore(org.jkiss.dbeaver.model.impl.preferences.BundlePreferenceStore)

Example 9 with BundlePreferenceStore

use of org.jkiss.dbeaver.model.impl.preferences.BundlePreferenceStore in project dbeaver by serge-rider.

the class ERDPreferencesInitializer method initializeDefaultPreferences.

@Override
public void initializeDefaultPreferences() {
    // Init default preferences
    DBPPreferenceStore store = new BundlePreferenceStore(ERDUIActivator.getDefault().getBundle());
    PrefUtils.setDefaultPreferenceValue(store, ERDUIConstants.PREF_DIAGRAM_SHOW_VIEWS, true);
    PrefUtils.setDefaultPreferenceValue(store, ERDUIConstants.PREF_DIAGRAM_SHOW_PARTITIONS, false);
    PrefUtils.setDefaultPreferenceValue(store, ERDUIConstants.PREF_DIAGRAM_CHANGE_BORDER_COLORS, true);
    PrefUtils.setDefaultPreferenceValue(store, ERDUIConstants.PREF_DIAGRAM_CHANGE_HEADER_COLORS, true);
    PrefUtils.setDefaultPreferenceValue(store, ERDUIConstants.PREF_PRINT_PAGE_MODE, ERDUIConstants.PRINT_MODE_DEFAULT);
    PrefUtils.setDefaultPreferenceValue(store, ERDUIConstants.PREF_PRINT_MARGIN_TOP, ERDUIConstants.PRINT_MARGIN_DEFAULT);
    PrefUtils.setDefaultPreferenceValue(store, ERDUIConstants.PREF_PRINT_MARGIN_BOTTOM, ERDUIConstants.PRINT_MARGIN_DEFAULT);
    PrefUtils.setDefaultPreferenceValue(store, ERDUIConstants.PREF_PRINT_MARGIN_LEFT, ERDUIConstants.PRINT_MARGIN_DEFAULT);
    PrefUtils.setDefaultPreferenceValue(store, ERDUIConstants.PREF_PRINT_MARGIN_RIGHT, ERDUIConstants.PRINT_MARGIN_DEFAULT);
    PrefUtils.setDefaultPreferenceValue(store, ERDUIConstants.PREF_GRID_ENABLED, false);
    PrefUtils.setDefaultPreferenceValue(store, ERDUIConstants.PREF_GRID_SNAP_ENABLED, true);
    PrefUtils.setDefaultPreferenceValue(store, ERDUIConstants.PREF_GRID_WIDTH, 20);
    PrefUtils.setDefaultPreferenceValue(store, ERDUIConstants.PREF_GRID_HEIGHT, 20);
}
Also used : BundlePreferenceStore(org.jkiss.dbeaver.model.impl.preferences.BundlePreferenceStore) DBPPreferenceStore(org.jkiss.dbeaver.model.preferences.DBPPreferenceStore)

Example 10 with BundlePreferenceStore

use of org.jkiss.dbeaver.model.impl.preferences.BundlePreferenceStore in project dbeaver by serge-rider.

the class SQLModelActivator method start.

@Override
public void start(BundleContext context) throws Exception {
    super.start(context);
    instance = this;
    preferences = new BundlePreferenceStore(getBundle());
}
Also used : BundlePreferenceStore(org.jkiss.dbeaver.model.impl.preferences.BundlePreferenceStore)

Aggregations

BundlePreferenceStore (org.jkiss.dbeaver.model.impl.preferences.BundlePreferenceStore)21 DBPPreferenceStore (org.jkiss.dbeaver.model.preferences.DBPPreferenceStore)6 MissingResourceException (java.util.MissingResourceException)5 Bundle (org.osgi.framework.Bundle)3 ResourceBundle (java.util.ResourceBundle)2