why does the AbstractPreferenceInitializer never get called? [message #321714] |
Wed, 24 October 2007 14:27  |
Eclipse User |
|
|
|
WinXP, R3.3 (I20070621-1340)
Several prior threads insist that the AbstractPreferenceInitializer will
automagically get run when it is needed. See:
"How to load default preferences ?"
"Setting the default values for preferences"
But when I declare an AbstractPreferenceInitializer like this (actually,
I used the template in the extension-point wizard):
<extension
point="org.eclipse.core.runtime.preferences">
<initializer
class="com.mun.ist.viewer.preferences.PreferenceInitializer ">
</initializer>
</extension>
and implement the sole method of PreferenceInitializer, setting a
breakpoint on the method shows that it is *NEVER* called, not even when
I open the pref-page, and certainly not when I access the preference-value.
So -- what else needs to be done to wire this up? (The extension-point
description says nothing about extra wiring.)
The workaround -- in case others are having this problem -- is just
this, in the Activator:
public void start(BundleContext context) throws Exception {
super.start(context);
new PreferenceInitializer().initializeDefaultPreferences();
}
thanks,
Paul
|
|
|
|
Powered by
FUDForum. Page generated in 0.03660 seconds