Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to save/load Preferences to DB?
How to save/load Preferences to DB? [message #1272968] Wed, 19 March 2014 03:39 Go to next message
Eclipse UserFriend
Hello,
is it possible to override the save/load-Method of the preferenceStore? I would like to use a DB as backend.

How can I do this? Need I a special IScopeContext or a own PreferencesStore? Can I extend existing classes?

Thanks a lot.

Marco
Re: How to save/load Preferences to DB? [message #1272991 is a reply to message #1272968] Wed, 19 March 2014 04:52 Go to previous messageGo to next message
Eclipse UserFriend
Hi Marko,
you have to create and register your own SettingStoreFactory. See [1]
and [2] for more details.

[1]
http://help.eclipse.org/kepler/topic/org.eclipse.rap.doc/guide/articles/data-stores.html?cp=52_3_2
[2]
http://help.eclipse.org/kepler/topic/org.eclipse.rap.doc/guide/reference/extension-points/org_eclipse_rap_ui_settingstores.html?cp=52_5_1_6
HTH,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: How to save/load Preferences to DB? [message #1272995 is a reply to message #1272968] Wed, 19 March 2014 05:05 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

In RAP, eclipse preferences are delegated to org.eclipse.rap.rwt.service.SettingStore

so you can achieve that by writing your own SettingStore implementation, that will persist preferences in DB instead of file.
You have also to implement SettingStoreFactory that will provide your SettingStore implementation.
I guess you have a Workbench application so you have to declare your factory using org.eclipse.rap.ui.settingstores extension and launch your application with -Dorg.eclipse.rap.rwt.settingStoreFactory=yourFactoryName

In RWT standalone it is a bit simpler, the SettingStoreFactory can directly be set on the Application

Regards,
Arnaud


Re: How to save/load Preferences to DB? [message #1273062 is a reply to message #1272995] Wed, 19 March 2014 08:32 Go to previous message
Eclipse UserFriend
Hello,
that works fine.

Thanks a lot for your answers.

Regards Marco
Previous Topic:Eclipse RAP Save As dialog
Next Topic:Mobile browser support and global scrollbars
Goto Forum:
  


Current Time: Mon Jul 14 09:48:51 EDT 2025

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

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

Back to the top