use of org.jkiss.dbeaver.runtime.jobs.KeepAliveListenerJob 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.runtime.jobs.KeepAliveListenerJob 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