preferencesService = bundleContext.registerService(IPreferencesService.class.getName(), PreferencesService.getDefault(), new Hashtable()); osgiPreferencesService = bundleContext.registerService(OSGI_PREFERENCES_SERVICE, new OSGiPreferencesServiceManager(bundleContext), null);
if (registryServiceTracker == null) {  registryServiceTracker = new ServiceTracker(bundleContext, "org.eclipse.core.runtime.IExtensionRegistry", this); registryServiceTracker.open(); } Object service = registryServiceTracker.getService(); if (service != null) { try {  Class clazz = Class.forName("org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper"); Constructor constructor = clazz.getConstructor(new Class[] {PreferencesService.class}); Object helper = constructor.newInstance(new Object[] {PreferencesService.getDefault()}); PreferencesService.getDefault().setRegistryHelper(helper); } catch (Exception e) { RuntimeLog.log(new Status(IStatus.ERROR, PI_PREFERENCES, 0, PrefsMessages.noRegistry, e)); } }
	private void registerServices() {		preferencesService = bundleContext.registerService(IPreferencesService.class.getName(), PreferencesService.getDefault(), new Hashtable());		osgiPreferencesService = bundleContext.registerService(OSGI_PREFERENCES_SERVICE, new OSGiPreferencesServiceManager(bundleContext), null);	}