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
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() {
public boolean visit(IEclipsePreferences node) throws BackingStoreException {
System.out.println(node.absolutePath()+" -> ";
return true;
} catch (BackingStoreException e) {

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?

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

Current Time: Mon Dec 06 21:37:49 GMT 2021

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

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

Back to the top