Search in sources :

Example 1 with BundlePreferenceStore

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

the class ERDActivator method start.

@Override
public void start(BundleContext context) throws Exception {
    super.start(context);
    plugin = this;
    preferences = new BundlePreferenceStore(getBundle());
    try {
        resourceBundle = ResourceBundle.getBundle(ERDMessages.BUNDLE_NAME);
    } catch (MissingResourceException x) {
        resourceBundle = null;
    }
    // Switch off D3D because of Sun XOR painting bug
    // See http://www.jgraph.com/forum/viewtopic.php?t=4066
    //$NON-NLS-1$
    System.setProperty("sun.java2d.d3d", Boolean.FALSE.toString());
}
Also used : BundlePreferenceStore(org.jkiss.dbeaver.model.impl.preferences.BundlePreferenceStore) MissingResourceException(java.util.MissingResourceException)

Example 2 with BundlePreferenceStore

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

the class ERDActivator method start.

@Override
public void start(BundleContext context) throws Exception {
    super.start(context);
    plugin = this;
    preferences = new BundlePreferenceStore(getBundle());
    try {
        resourceBundle = ResourceBundle.getBundle(ERDMessages.BUNDLE_NAME);
    } catch (MissingResourceException x) {
        resourceBundle = null;
    }
    // Switch off D3D because of Sun XOR painting bug
    // See http://www.jgraph.com/forum/viewtopic.php?t=4066
    // $NON-NLS-1$
    System.setProperty("sun.java2d.d3d", Boolean.FALSE.toString());
}
Also used : BundlePreferenceStore(org.jkiss.dbeaver.model.impl.preferences.BundlePreferenceStore) MissingResourceException(java.util.MissingResourceException)

Example 3 with BundlePreferenceStore

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

the class ERDPreferencesInitializer method initializeDefaultPreferences.

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

Example 4 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 5 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)

Aggregations

BundlePreferenceStore (org.jkiss.dbeaver.model.impl.preferences.BundlePreferenceStore)32 DBPPreferenceStore (org.jkiss.dbeaver.model.preferences.DBPPreferenceStore)8 MissingResourceException (java.util.MissingResourceException)6 Bundle (org.osgi.framework.Bundle)4 ResourceBundle (java.util.ResourceBundle)2