Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » why does the AbstractPreferenceInitializer never get called?
why does the AbstractPreferenceInitializer never get called? [message #321714] Wed, 24 October 2007 18:27 Go to next message
Paul E. Keyser is currently offline Paul E. KeyserFriend
Messages: 878
Registered: July 2009
Senior Member
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):

class=" ">

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 {
new PreferenceInitializer().initializeDefaultPreferences();

Re: why does the AbstractPreferenceInitializer never get called? [message #688264 is a reply to message #321714] Fri, 24 June 2011 09:49 Go to previous message
hobbes_infect is currently offline hobbes_infectFriend
Messages: 1
Registered: June 2011
Junior Member
I experienced the same problems but it worked fine after adding

IPreferenceStore store = Activator.getDefault().getPreferenceStore();

to the preference page constructor.
Previous Topic:Where to call external compiler
Next Topic:confused about Indigo release
Goto Forum:

Current Time: Thu Nov 26 00:45:00 GMT 2015

Powered by FUDForum. Page generated in 0.01694 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software