Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Information on defaults Preferences
Information on defaults Preferences [message #132529] Wed, 13 May 2009 07:24 Go to next message
Maghen Calinghee is currently offline Maghen CalingheeFriend
Messages: 23
Registered: July 2009
Junior Member
Hi,

I would like to have some informations on defaults preferences in RAP.
In RCP, we can add a preferences file(.ini) to set the defaults
preferences by customizing the product as shown here :
http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/product_configproduct.htm
My question is how can we add defaults preferences in a RAP application.

Maghen.
Re: Information on defaults Preferences [message #132567 is a reply to message #132529] Wed, 13 May 2009 08:42 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
Maghen,

a preference initializer can also be used to set defaults. Note that
in RAP this mechanism is intended to set defaults for session-scoped
preferences.

<extension
point="org.eclipse.core.runtime.preferences">
<initializer class="MyInitializer"></initializer>
</extension>

HTH
Rüdiger

Maghen Calinghee wrote:
> Hi,
>
> I would like to have some informations on defaults preferences in RAP.
> In RCP, we can add a preferences file(.ini) to set the defaults
> preferences by customizing the product as shown here :
> http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/product_configproduct.htm
>
> My question is how can we add defaults preferences in a RAP application.
>
> Maghen.
>
Re: Information on defaults Preferences [message #132619 is a reply to message #132567] Wed, 13 May 2009 11:12 Go to previous messageGo to next message
Maghen Calinghee is currently offline Maghen CalingheeFriend
Messages: 23
Registered: July 2009
Junior Member
Hi Rüdiger,
Thanks for replying. In fact, I would like to define preferences on the
perspective bar(to put it on the topRight, show the text, etc..).
But I will use a preference initializer to see how it works.

Maghen.
Re: Information on defaults Preferences [message #133008 is a reply to message #132619] Fri, 15 May 2009 09:08 Go to previous messageGo to next message
Maghen Calinghee is currently offline Maghen CalingheeFriend
Messages: 23
Registered: July 2009
Junior Member
Hi Rüdiger,

I've used a preferences initializer to set the location of the perspective
bar and to show or not the "open perspective" button but it does not work.
How can i set preferences on the perspective bar in RAP?
Thanks you for helping me.


Maghen.
Re: Information on defaults Preferences [message #133087 is a reply to message #133008] Fri, 15 May 2009 16:25 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
Maghen,

my previous post might have been misleading. The preference
initializer is only meant to set defaults for the plug-in that it is
defined in. Thus it is only called if you access the preferences of
the plug-in.
As RAP does not know about products, the options are becoming
sparse. You may consider directly setting the preferences of the
workbench plug-in programmatically.

Rüdiger

Maghen Calinghee wrote:
> Hi Rüdiger,
>
> I've used a preferences initializer to set the location of the
> perspective bar and to show or not the "open perspective" button but it
> does not work.
> How can i set preferences on the perspective bar in RAP?
> Thanks you for helping me.
>
>
> Maghen.
>
>
>
Re: Information on defaults Preferences [message #133099 is a reply to message #133087] Fri, 15 May 2009 16:59 Go to previous messageGo to next message
Maghen Calinghee is currently offline Maghen CalingheeFriend
Messages: 23
Registered: July 2009
Junior Member
Rüdiger,

First of all thank you for replying. Yes, I've understood what a
preference initializer does now. In fact I thought there was something to
add options like in RCP, we can add them via the "pluginCustomization"
when we define a product.
So I will try to do it programmatically then (but I won't try it until
wednesday).
Thank you for your time for the explanation and have a great week end over
there!

Maghen
Re: Information on defaults Preferences [message #133875 is a reply to message #133099] Fri, 22 May 2009 10:11 Go to previous message
Maghen Calinghee is currently offline Maghen CalingheeFriend
Messages: 23
Registered: July 2009
Junior Member
Hi,

I just post to help people if they want to put default preferences on
their RAP application, it's better to do it in a programmatic way.
If we want to customize something which need to be loaded at the
initialization of the application (for example, if we do not want to see
the "Open Perspective" button at the initialization of the application).
Just put your code before the application is totally launched. Me i've
done the loading of preferences in my WorkbenchAdvisor class.

By the way, thanks you Rüdiger for helping me!

Maghen.
Previous Topic:importPreferences throws exception
Next Topic:StatusBar, MessageBox, ... breaking UI window?
Goto Forum:
  


Current Time: Thu Mar 28 14:39:25 GMT 2024

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

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

Back to the top