Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Preferences vs. IPreferenceStore
Preferences vs. IPreferenceStore [message #334663] Mon, 23 February 2009 22:20
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Today I realized that we have this very strange duality of
org.eclipse.core.runtime.Preferences and
org.eclipse.jface.preference.IPreferenceStore - their interfaces are
essentailly the same.
I'm sure there is some story about why IPreferenceStore was created
instead of leveraging Preferences, and why IPreferenceStore is not in
org.eclipse.core.runtime so Preferences could just implement it.
This seems to create problems when you want to have a
FieldEditorPreferencePage that controls preferences that a non-UI plugin
needs to read. The page needs an IPreferencesStore but the non-UI plugin
only has a Preferences.
Why is this so complicated?

After some searching, I did find
org.eclipse.jdt.internal.ui.text.PreferencesAdapter which seems to be
exactly the bridge that is needed here. But, alas, it is not API. Why
not? It does not appear to have any significant dependencies to the rest
of JDT and is a pretty simple (if lengthy) class. Is there some hidden
reason why it is not available for others to leverage? Is it worth
filing a bug about that? (BTW, it seems DLTK has a very similar class,
and it is not in an internal package. There are also other classes
scattered around whose names suggest they do something similar.)

I'm just very surprised this is so much effort to get working - a UI
for preferences used by non-UI plugins. Really? Am I missing something?

Eric
Previous Topic:Parameterized View
Next Topic:Selection Service between different IEditorParts
Goto Forum:
  


Current Time: Sun Nov 17 21:24:43 GMT 2024

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

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

Back to the top