Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » PlatformUI.getPreferenceStore() without values?(The store seems to return only default values.)
PlatformUI.getPreferenceStore() without values? [message #657649] Thu, 03 March 2011 15:22 Go to next message
Noone  is currently offline Noone Friend
Messages: 8
Registered: March 2011
Junior Member
I'm currently working on deploying a RAP application to Tomcat. The application works fine when it's started with the jetty included in eclipse.

I use a org.eclipse.ui.dialogs.FilteredTree inside a view. When the application is deployed in tomcat, filteredTree.getFilterControl() returns a null value.

After checking the source of the RAP-FilteredTree, I found this code:

...
showFilterControls = PlatformUI.getPreferenceStore().getBoolean(IWorkbenchPreferenceConstants.SHOW_FILTERED_TEXTS);
...
if (showFilterControls) {
 // add filter controls 
}


So, it seems that showFilterControls has the correct value (true) when the application is started inside eclipse, and that it has the PreferenceStore's default value (which is false) when the application is deployed inside a war in tomcat.

In regards to that PreferenceStore, I found some info for RCP applications (which talk about .ini files where you can set values for the preferences in IWorkbenchPreferenceConstants). However, none of this seems to apply to RAP.

Could someone explain the mechanism in RAP that loads those settings or point me to some documentation that I can use?

Thanks in advance!

[Updated on: Thu, 03 March 2011 15:23]

Report message to a moderator

Re: PlatformUI.getPreferenceStore() without values? [message #657896 is a reply to message #657649] Fri, 04 March 2011 14:39 Go to previous messageGo to next message
Noone  is currently offline Noone Friend
Messages: 8
Registered: March 2011
Junior Member
Some more information: I'm also getting the error-message
!MESSAGE Invalid value for org.eclipse.rap.ui/initialFastViewBarLocation preference.  Value "" should be one of "left", "bottom", or "right".

in the OSGI console when I start the application. This also hints to some problem with the preferences. Searching for the message provided this discussion:

http://dev.eclipse.org/newslists/news.eclipse.technology.rap /msg04164.html

where it turned out that it was a bug in some template. The bug was then fixed for RAP 1.2M5.


Perhaps searching in direction of some "template" may help me with my error. However, I have no idea what the mentioned template is, and what is it used for. Could someone explain it to me or point me in the right direction?

Thanks in advance.
Re: PlatformUI.getPreferenceStore() without values? [message #658197 is a reply to message #657896] Mon, 07 March 2011 11:23 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi,

have you tried to clear your cookie cache in the browser just to make
sure that there are no stale preference data?

Regards, Ralf

--
Ralf Sternberg

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: PlatformUI.getPreferenceStore() without values? [message #658383 is a reply to message #658197] Tue, 08 March 2011 10:13 Go to previous messageGo to next message
Noone  is currently offline Noone Friend
Messages: 8
Registered: March 2011
Junior Member
Thanks for the suggestion - I just tried that, but sadly it did not help.
Re: PlatformUI.getPreferenceStore() without values? [message #658535 is a reply to message #658383] Tue, 08 March 2011 20:46 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi,

it's hard to believe that the problem does only occur with Tomcat, but
not with Jetty, because there's no obvious difference that could affect
this kind of problems. Just to be sure could you try again to undeploy
your war, clean up your tomcat/work directory and then re-deploy? If you
did this *and* cleared your browser cookie cache and still get this
error, please open a new bug for it.

Thanks, Ralf

--
Ralf Sternberg

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: PlatformUI.getPreferenceStore() without values? [message #658604 is a reply to message #658535] Wed, 09 March 2011 08:54 Go to previous messageGo to next message
Noone  is currently offline Noone Friend
Messages: 8
Registered: March 2011
Junior Member
You are correct - I should have described it more exactly I guess. What happened was this:


When starting the application from inside Eclipse (with the embedded jetty) it works fine.

When deploying the application as .war file into a Tomcat or a standalone Jetty, it does not work.


The .war file is created in a headless build, so there is probably something wrong with the build process. However, I have no idea where to look for the error: Is something missing inside the .war? Is one of the various configuration files inside incomplete/incorrect? Something else?

The examples I found for deploying RAP applications as .war do not contain anything in regards to those preferences (as far as I can tell).

[Updated on: Wed, 09 March 2011 09:08]

Report message to a moderator

Re: PlatformUI.getPreferenceStore() without values? [message #658619 is a reply to message #658604] Wed, 09 March 2011 09:43 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi,

it's very unlikely that his error has anything to do with the structure
of your war file. If your war file works and uses recent versions of the
rap bundles, please file a bug. We'll need some code or a good recipe how
to reproduce the problem.

I would however recommend to try the new war product tooling [1] to
create war files - it works like a charm...

Regards, Ralf

[1] http://wiki.eclipse.org/RAP/Equinox_WAR_products

--
Ralf Sternberg

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: PlatformUI.getPreferenceStore() without values? [message #658629 is a reply to message #658619] Wed, 09 March 2011 10:36 Go to previous messageGo to next message
Noone  is currently offline Noone Friend
Messages: 8
Registered: March 2011
Junior Member
We are currently not using the newest RAP version, but only 1.4 M4 (due to problems with resolving references of the BIRT runtime we are using).

So, I will first try to use the current RAP version and see if the error persists. If so, I'll do a bugreport and supply you with the means to reproduce the bug.
Re: PlatformUI.getPreferenceStore() without values? [message #731217 is a reply to message #658629] Fri, 30 September 2011 09:56 Go to previous messageGo to next message
Timo Vogt is currently offline Timo VogtFriend
Messages: 2
Registered: September 2011
Junior Member
Hi,

i have the same problem. Is there any solution now available?

Regards Timo
Re: PlatformUI.getPreferenceStore() without values? [message #733381 is a reply to message #731217] Tue, 04 October 2011 15:57 Go to previous message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 335
Registered: July 2009
Senior Member
Timo,

are you aware of this thread?
http://www.eclipse.org/forums/index.php/t/204266/
http://www.eclipse.org/forums/index.php/t/243430/
(the thread got split into two for some reason, hence the second link)

HTH
Rüdiger

On 30.09.2011 11:56, Timo Vogt wrote:
> Hi,
>
> i have the same problem. Is there any solution now available?
>
> Regards Timo

--
Rüdiger Herrmann

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:How to create a url to a generated resource?
Next Topic:Problem to get instance of org.eclipse.swt.WidgetManager
Goto Forum:
  


Current Time: Thu Oct 28 09:32:52 GMT 2021

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

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

Back to the top