IExtension[] extensions = PreferencesService.getPrefExtensions(); if (extensions.length == 0) { if (EclipsePreferences.DEBUG_PREFERENCE_GENERAL) PrefsMessages.message("Skipping runtime default preference customization."); return; } boolean foundInitializer = false; for (int i = 0; i < extensions.length; i++) { IConfigurationElement[] elements = extensions[i].getConfigurationElements(); for (int j = 0; j < elements.length; j++) if (ELEMENT_INITIALIZER.equals(elements[j].getName())) { if (name().equals(elements[j].getContributor().getName())) { if (EclipsePreferences.DEBUG_PREFERENCE_GENERAL) { IExtension theExtension = elements[j].getDeclaringExtension(); String extensionNamespace = theExtension.getContributor().getName(); Bundle underlyingBundle = PreferencesOSGiUtils.getDefault().getBundle(extensionNamespace); String ownerName; if (underlyingBundle != null) ownerName = underlyingBundle.getSymbolicName(); else ownerName = extensionNamespace; PrefsMessages.message("Running default preference customization as defined by: " + ownerName); } runInitializer(elements[j]);  foundInitializer = true; } } } if (foundInitializer) return;   Object plugin = pluginReference.get(); ILegacyPreferences initService = PreferencesOSGiUtils.getDefault().getLegacyPreferences(); if (initService != null) plugin = initService.init(plugin, name()); pluginReference = new WeakReference(plugin);
WeakReference ref = PreferencesService.getDefault().applyRuntimeDefaults(name(), pluginReference); if (ref != null) pluginReference = ref;
	private void applyRuntimeDefaults() {		IExtension[] extensions = PreferencesService.getPrefExtensions();		if (extensions.length == 0) {			if (EclipsePreferences.DEBUG_PREFERENCE_GENERAL)				PrefsMessages.message("Skipping runtime default preference customization."); //$NON-NLS-1$			return;		}		boolean foundInitializer = false;		for (int i = 0; i < extensions.length; i++) {			IConfigurationElement[] elements = extensions[i].getConfigurationElements();			for (int j = 0; j < elements.length; j++)				if (ELEMENT_INITIALIZER.equals(elements[j].getName())) {					if (name().equals(elements[j].getContributor().getName())) {						if (EclipsePreferences.DEBUG_PREFERENCE_GENERAL) {							IExtension theExtension = elements[j].getDeclaringExtension();							String extensionNamespace = theExtension.getContributor().getName();							Bundle underlyingBundle = PreferencesOSGiUtils.getDefault().getBundle(extensionNamespace);							String ownerName;							if (underlyingBundle != null)								ownerName = underlyingBundle.getSymbolicName();							else								ownerName = extensionNamespace;							PrefsMessages.message("Running default preference customization as defined by: " + ownerName); //$NON-NLS-1$						}						runInitializer(elements[j]);						// don't return yet in case we have multiple initializers registered						foundInitializer = true;					}				}		}		if (foundInitializer)			return;		// Do legacy plugin preference initialization		Object plugin = pluginReference.get();		ILegacyPreferences initService = PreferencesOSGiUtils.getDefault().getLegacyPreferences();		if (initService != null)			plugin = initService.init(plugin, name());			pluginReference = new WeakReference(plugin);	}