Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » default preferences in RCP (2.7)
default preferences in RCP (2.7) [message #922736] Tue, 25 September 2012 09:23
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Hi,
I have a small RCP App I want to hook into preferences.
Since most values I need are "standard" (fonts, colors, ...) I started adding a default org.eclipse.ui.window.preferences command to my menu.

This correctly opens a Preference dialog with very reduced possibilities (as expected).

Problem is: how do I get those values?
I tried to dump the PreferenceStore with the following code:

preferenceStore = Activator.getDefault().getPreferenceStore();
if (preferenceStore instanceof ScopedPreferenceStore) {
ScopedPreferenceStore sps = (ScopedPreferenceStore) preferenceStore;
for (IEclipsePreferences ep : sps.getPreferenceNodes(true)) {
try {
ep.accept(new IPreferenceNodeVisitor() {
@Override
public boolean visit(IEclipsePreferences node) throws BackingStoreException {
System.out.println(node.absolutePath()+" -> "+node.name());
return true;
}
});
} catch (BackingStoreException e) {
e.printStackTrace();
}
}
}

but it appears empty (only the two root nodes: instance and default are printed):

/instance/it.condarelli.writer.browser -> it.condarelli.writer.browser
/default/it.condarelli.writer.browser -> it.condarelli.writer.browser

Where are the "standard" Preference values?
Can I get hold of them?

TiA
Mauro
Previous Topic:RCP application on MAC
Next Topic:org.eclipse.jdt.ui.javaEditorTextHovers and eclipse 4.2
Goto Forum:
  


Current Time: Fri Apr 26 01:10:04 GMT 2024

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

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

Back to the top