Reload org.eclipse.ui.workbench.prefs in 3.4? [message #335551] |
Tue, 14 April 2009 09:46 |
Eclipse User |
|
|
|
Hello,
in our RCP application we've gone from using Eclipse 3.3 to using
Eclipse 3.4. Since the upgrade the restoring of a perspective's layout
isn't working any more. I wasn't really surprised seeing that we are
using some of Eclipse's internal classes to achieve the storing of a
perspective's layout.
However, after a day's debugging I've found the problem. The
perspective's properties are stored in the
org.eclipse.ui.workbench.prefs file. And this cannot be found because in
3.4 this file is being loaded _before_ a workspace is set (we're running
our application with the osgi.instance.area=@noDefault setting).
The cause of this is the addition of a line in
org.eclipse.ui.internal.UISynchronizer#UISynchronizer(Displa y,
UILockListener) in 3.4. This constructor tries to get a setting from the
org.eclipse.ui.workbench.prefs file.
Long story short, I'm wondering if there is any way to reload said
preference file. I tried something like this (not nice)
<code>
IPreferenceStore store = new ScopedPreferenceStore(new InstanceScope(),
"org.eclipse.ui.workbench");
((ScopedPreferenceStore) store).getPreferenceNodes(true);
</code>
to see what would happen. I only got the cached preferences which hadn't
been found by UISynchronizer's call.
Kind egards
Bianca
|
|
|
Powered by
FUDForum. Page generated in 0.02796 seconds