Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Initializing preferences when creating a new workspace
Initializing preferences when creating a new workspace [message #494459] Fri, 30 October 2009 17:32 Go to next message
VincentL is currently offline VincentLFriend
Messages: 88
Registered: July 2009
Member
Hi,

I'm developping an rcp application and I want to initialize some preferences (stored in
..metadata\.plugins\org.eclipse.core.runtime\.settings) when a new workspace is created.


1- Where should I modify my application to acheive this kind of behaviour?
2- It is possible to detect that a new workspace is created in my rcp application?
3- It is possible to reuse the import preferences action of the IDE?

Thanks

Vincent
Re: Initializing preferences when creating a new workspace [message #494686 is a reply to message #494459] Mon, 02 November 2009 08:13 Go to previous messageGo to next message
T. Wilhelm is currently offline T. WilhelmFriend
Messages: 129
Registered: July 2009
Senior Member
Hi Vincent,

have a look at the class AbstractPreferenceInitializer and the extension Point org.eclipse.core.runtime.preferences (new -> initializer), there you can set default values to your preferences.
Hopes this helps you.

Greetz,
Thomas

[Updated on: Mon, 02 November 2009 08:14]

Report message to a moderator

Re: Initializing preferences when creating a new workspace [message #494711 is a reply to message #494686] Mon, 02 November 2009 10:05 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 769
Registered: July 2009
Location: Grenoble, France
Senior Member
Hello,

You could also consider using the plugin_customization.ini file.

HEH

T. Wilhelm a écrit :
> Hi Vincent,
>
> have a look at the class AbstractPreferenceInitializer, there you can
> set default values to your preferences. Hopes this helps you.
>
> Greetz,
> Thomas


--

--
Mickael Istria - BonitaSoft S.A.
http://www.bonitasoft.com/products/downloads.php
Re: Initializing preferences when creating a new workspace [message #495036 is a reply to message #494711] Tue, 03 November 2009 15:32 Go to previous messageGo to next message
VincentL is currently offline VincentLFriend
Messages: 88
Registered: July 2009
Member
Hi Thomas and Mickael,

I didn't have the time to test the AbstractPreferenceInitializer class yet, but here some
comments and questions.

1- The settings I want to initialize are part of the Eclipse plugins not developped by our
company. These settings don't seem to support plugin_customization.ini file.

2- Can I use AbstractPreferenceInitializer class to initialize setting of external plugins
or only the plugin that contains the org.eclipse.core.runtime.preferences extension?

3- Can I generate .metadata\.plugins\org.eclipse.core.runtime\.settings\*.pref file
manually using Eclipse API ? Should I do this in the AbstractPreferenceInitializer class?

Thanks,

Vincent
Re: Initializing preferences when creating a new workspace [message #495037 is a reply to message #494711] Tue, 03 November 2009 15:33 Go to previous messageGo to next message
VincentL is currently offline VincentLFriend
Messages: 88
Registered: July 2009
Member
Hi Thomas and Mickael,

I didn't have the time to test the AbstractPreferenceInitializer class yet, but here some
comments and questions.

1- The settings I want to initialize are part of the Eclipse plugins not developped by our
company. These settings don't seem to support plugin_customization.ini file.

2- Can I use AbstractPreferenceInitializer class to initialize setting of external plugins
or only the plugin that contains the org.eclipse.core.runtime.preferences extension?

3- Can I generate .metadata\.plugins\org.eclipse.core.runtime\.settings\*.pref file
manually using Eclipse API ? Should I do this in the AbstractPreferenceInitializer class?

Thanks,

Vincent
Re: Initializing preferences when creating a new workspace [message #495062 is a reply to message #495036] Tue, 03 November 2009 16:56 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3801
Registered: July 2009
Senior Member
Vincent L. wrote:
> Hi Thomas and Mickael,
>
> I didn't have the time to test the AbstractPreferenceInitializer class
> yet, but here some comments and questions.
>
> 1- The settings I want to initialize are part of the Eclipse plugins
> not developped by our company. These settings don't seem to support
> plugin_customization.ini file.
Which ones exactly?

Dani
>
> 2- Can I use AbstractPreferenceInitializer class to initialize setting
> of external plugins or only the plugin that contains the
> org.eclipse.core.runtime.preferences extension?
>
> 3- Can I generate
> .metadata\.plugins\org.eclipse.core.runtime\.settings\*.pref file
> manually using Eclipse API ? Should I do this in the
> AbstractPreferenceInitializer class?
>
> Thanks,
>
> Vincent
>
>
>
>
>
>
>
Re: Initializing preferences when creating a new workspace [message #495098 is a reply to message #495062] Tue, 03 November 2009 17:59 Go to previous messageGo to next message
VincentL is currently offline VincentLFriend
Messages: 88
Registered: July 2009
Member
Hi Daniel,

Currently, we only want to initialize the following plugins:

1- org.python.pydev
2- org.python.pydev.debug
3- org.eclipse.tm.terminal.view

For example, in the case of pydev plugins, since we are distributing python application
interpreter with our rcp application, we want to make sure that the pydev plugin are
pre-configurer to use our specific interpreter.

Thanks

Vincent
Re: Initializing preferences when creating a new workspace [message #495204 is a reply to message #495098] Wed, 04 November 2009 07:35 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3801
Registered: July 2009
Senior Member
Vincent L. wrote:
> Hi Daniel,
>
> Currently, we only want to initialize the following plugins:
>
> 1- org.python.pydev
> 2- org.python.pydev.debug
> 3- org.eclipse.tm.terminal.view
You should file a bug report to them if they don't support the
plugin_customization.ini.

Dani
>
> For example, in the case of pydev plugins, since we are distributing
> python application interpreter with our rcp application, we want to
> make sure that the pydev plugin are pre-configurer to use our specific
> interpreter.
>
> Thanks
>
> Vincent
Re: Initializing preferences when creating a new workspace [message #495325 is a reply to message #495204] Wed, 04 November 2009 14:39 Go to previous message
VincentL is currently offline VincentLFriend
Messages: 88
Registered: July 2009
Member
Ok thanks.

Vincent
Previous Topic:Confusing PreferenceStore
Next Topic:Views update from application
Goto Forum:
  


Current Time: Sun Nov 23 17:20:06 GMT 2014

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

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