Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Storing workspace-level preferences (with IScopeContext?)
Storing workspace-level preferences (with IScopeContext?) [message #316736] Sun, 17 June 2007 07:10 Go to next message
Eclipse UserFriend
Hi,

I need to store workspace-level preferences and I'm guessing these go
into the workspace's .metadata folder somewhere. For my project-specific
settings, I used ProjectScope and its getName(String) method which works
perfectly for throwing things in the .settings folder like the good
Eclipse citizen I'm trying to be (originally I was manually grabbing the
IFolder and IFile and then using java.util.Properties...*shudders*).

I know there's IPreferenceStore but that's in JFace. Am I supposed to
use an implementation of IScopeContext again for workspace-level
settings? Which implementation of IScopeContext do I use then? Am I
supposed to be using something else actually?

Thank you for your time. :)

Regards,
Rem
Re: Storing workspace-level preferences (with IScopeContext?) [message #316754 is a reply to message #316736] Mon, 18 June 2007 07:31 Go to previous messageGo to next message
Eclipse UserFriend
Remy, for workspace level preferences you want InstanceScope. If you
are creating a UI plugin (that subclassed AbstractUIPlugin) you get a
"public IPreferenceStore getPreferenceStore()" method for free, which
basically creates a ScopedPreferenceStore with an InstanceScope.

Later,
PW
Re: Storing workspace-level preferences (with IScopeContext?) [message #316763 is a reply to message #316754] Mon, 18 June 2007 09:32 Go to previous message
Eclipse UserFriend
This works but for I must use DefaultScope instead of InstanceScope if I
am going to use a concrete subclass of AbstractPreferenceInitializer in
order to initialize the preferences.

Is this expected behaviour?

Regards,
Rem
Previous Topic:Close
Next Topic:Programmatic editor Action / Command confusion
Goto Forum:
  


Current Time: Sun Jul 27 15:33:13 EDT 2025

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

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

Back to the top