How to load default preferences ? [message #308875] |
Fri, 06 October 2006 13:51 |
Eclipse User |
|
|
|
Originally posted by: priya_kothari.persistent.co.in
Hi,
I want my plugin to load the default preferences given in the Preference
page. I have overridden initializeDefaultPluginPreferences() method in my
plugin class and have set the default values in the preference store. But
this API is not getting called and so my default values are not getting
loaded. If I call this API explicity, I can see the default values.
Am I missing something that calls the API mentioned which I might not have
overridden?
Here my default values are used to decorate the text in Package explorer.
~Priya
|
|
|
|
|
Re: How to load default preferences ? [message #308886 is a reply to message #308885] |
Fri, 06 October 2006 23:00 |
Eclipse User |
|
|
|
Originally posted by: no.ddress.here
In article <eg6g5c$jhl$1@utils.eclipse.org>, rolarenfan@earthlink.net
says...
> But that only runs when the user opens the "Prefs" dialog (Window -> Prefs -> MyPage), right?
Believe that it runs when the Plugin loads -- it is a core runtime
extension.
> What if one wants to ensure that the default values are set when the app
> starts so that client code
> can use the preferences before the user goes and checks the values?
If use of the extension point is not desired for some reason, the
AbstractUIPlugin#start() method (overridden from the plugin activator
class) is available.
|
|
|
|
Re: How to load default preferences ? [message #308922 is a reply to message #308909] |
Tue, 10 October 2006 06:36 |
Eclipse User |
|
|
|
Originally posted by: priya_kothari.persistent.co.in
Could you tell that way of specifying the initializer?
My problem got resolved when I used the extension
"org.eclipse.core.runtime.preferences"
"Paul Webster" <pwebster@ca.ibm.com> wrote in message
news:egempj$31q$1@utils.eclipse.org...
> Paul Keyser wrote:
>> But that only runs when the user opens the "Prefs" dialog (Window ->
>> Prefs -> MyPage), right?
>>
>> What if one wants to ensure that the default values are set when the app
>> starts so that client code can use the preferences before the user goes
>> and checks the values?
>>
>
> There's also a way to specify an initializer when you create your
> preference. It's only loaded if something needs to read your preference.
>
> Later,
> PW
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03799 seconds