|
|
|
|
Re: Default Preferences initialize from product? [message #323057 is a reply to message #323056] |
Thu, 06 December 2007 11:59  |
Eclipse User |
|
|
|
Snjezana Peco wrote:
> Philipp,
>
> You can use preference initializer class like the following:
>
> <extension point="org.eclipse.core.runtime.preferences">
> <initializer
> class="com.yourcomany.preferences.YourPreferenceInitializer "/>
> </extension>
>
> The YourPrefrenceInitializer class would extend the
> AbstractPreferenceInitializer class and implement
> the initializeDefaultPreferences method.
>
> Snjeza
>
>
> Philipp Kursawe wrote:
>> Thanks Snjeza,
>>
>> I am aware of product customization. It works for all the eclipse UI
>> stuff that you mention in your example. But for my own preferences it
>> does not work.
>>
>> Snjezana Peco wrote:
>>> You need to define your product as follows:
>>>
>>> <extension
>>> id="your_product_id"
>>> point="org.eclipse.core.runtime.products">
>>> <product
>>> application="com.yourcompany.YourApplicationApplication"
>>> name="Your Application">
>>> <property
>>> name="preferenceCustomization"
>>> value="plugin_customization.ini"/>
>>> <property
>>> name="aboutImage"
>>> value="icons/x.gif"/>
>>> <property
>>> ...../>
>>> </product>
>>> </extension>
>>>
>>> and create the plugin_customization.ini file in your product plugin
>>> like the following:
>>>
>>> org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=false
>>> org.eclipse.ui/SHOW_TEXT_ON_PERSPECTIVE_BAR=false
>>> org.eclipse.ui/DOCK_PERSPECTIVE_BAR=left
>>> org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=false
>>> ...
>>>
>>> Snjeza
>>>
>>> Philipp Kursawe wrote:
>>>> Hello,
>>>>
>>>> Is there a way to initalize preferences using the product
>>>> customization? Adding /instance/ or /default/ nodes to the
>>>> preferences.ini does not seem to work.
>>>>
>>>> Thanks,
>>>> Phil
Using this construct:
private final Preferences prefs = new
DefaultScope().getNode(ReprioritizerPlugin.getId());
I am able to finally get the values defined in the products customization.
Thanks for your help!
Phil
|
|
|
Powered by
FUDForum. Page generated in 0.06911 seconds