use of org.jkiss.dbeaver.model.impl.preferences.AbstractPreferenceStore in project dbeaver by serge-rider.
the class DataSourcePreferenceStore method firePropertyChangeEvent.
@Override
public void firePropertyChangeEvent(String name, Object oldValue, Object newValue) {
super.firePropertyChangeEvent(name, oldValue, newValue);
// Forward event to global DS prefs store
DBPPreferenceStore gps = DBWorkbench.getPlatform().getDataSourceProviderRegistry().getGlobalDataSourcePreferenceStore();
if (gps instanceof AbstractPreferenceStore) {
((AbstractPreferenceStore) gps).firePropertyChangeEvent(this, name, oldValue, newValue);
}
}
use of org.jkiss.dbeaver.model.impl.preferences.AbstractPreferenceStore in project dbeaver by dbeaver.
the class BasePlatformImpl method initialize.
protected void initialize() {
log.debug("Initialize base platform...");
DBPPreferenceStore prefsStore = getPreferenceStore();
// Global pref events forwarder
prefsStore.addPropertyChangeListener(event -> {
// Forward event to all data source preferences
for (DBPDataSourceContainer ds : DataSourceRegistry.getAllDataSources()) {
((AbstractPreferenceStore) ds.getPreferenceStore()).firePropertyChangeEvent(prefsStore, event.getProperty(), event.getOldValue(), event.getNewValue());
}
});
this.localSystem = new OSDescriptor(Platform.getOS(), Platform.getOSArch());
{
this.language = PlatformLanguageRegistry.getInstance().getLanguage(Locale.getDefault());
if (this.language == null) {
log.debug("Language for locale '" + Locale.getDefault() + "' not found. Use default.");
this.language = PlatformLanguageRegistry.getInstance().getLanguage(Locale.ENGLISH);
}
}
// Navigator model
this.navigatorModel = new DBNModel(this, null);
this.navigatorModel.initialize();
// Activate plugin services
for (IPluginService pluginService : PluginServiceRegistry.getInstance().getServices()) {
try {
pluginService.activateService();
activatedServices.add(pluginService);
} catch (Throwable e) {
log.error("Error activating plugin service", e);
}
}
// Keep-alive job
new KeepAliveListenerJob(this).scheduleMonitor();
}
use of org.jkiss.dbeaver.model.impl.preferences.AbstractPreferenceStore in project dbeaver by dbeaver.
the class DataSourcePreferenceStore method firePropertyChangeEvent.
@Override
public void firePropertyChangeEvent(String name, Object oldValue, Object newValue) {
super.firePropertyChangeEvent(name, oldValue, newValue);
// Forward event to global DS prefs store
DBPPreferenceStore gps = DBWorkbench.getPlatform().getDataSourceProviderRegistry().getGlobalDataSourcePreferenceStore();
if (gps instanceof AbstractPreferenceStore) {
((AbstractPreferenceStore) gps).firePropertyChangeEvent(this, name, oldValue, newValue);
}
}
use of org.jkiss.dbeaver.model.impl.preferences.AbstractPreferenceStore in project dbeaver by serge-rider.
the class BasePlatformImpl method initialize.
protected void initialize() {
log.debug("Initialize base platform...");
DBPPreferenceStore prefsStore = getPreferenceStore();
// Global pref events forwarder
prefsStore.addPropertyChangeListener(event -> {
// Forward event to all data source preferences
for (DBPDataSourceContainer ds : DataSourceRegistry.getAllDataSources()) {
((AbstractPreferenceStore) ds.getPreferenceStore()).firePropertyChangeEvent(prefsStore, event.getProperty(), event.getOldValue(), event.getNewValue());
}
});
this.localSystem = new OSDescriptor(Platform.getOS(), Platform.getOSArch());
{
this.language = PlatformLanguageRegistry.getInstance().getLanguage(Locale.getDefault());
if (this.language == null) {
log.debug("Language for locale '" + Locale.getDefault() + "' not found. Use default.");
this.language = PlatformLanguageRegistry.getInstance().getLanguage(Locale.ENGLISH);
}
}
// Navigator model
this.navigatorModel = new DBNModel(this, null);
this.navigatorModel.initialize();
// Activate plugin services
for (IPluginService pluginService : PluginServiceRegistry.getInstance().getServices()) {
try {
pluginService.activateService();
activatedServices.add(pluginService);
} catch (Throwable e) {
log.error("Error activating plugin service", e);
}
}
// Keep-alive job
new KeepAliveListenerJob(this).scheduleMonitor();
}
Aggregations