Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to store data in the $WORKSPACE/.metadata/.plugins/myplugin folder
How to store data in the $WORKSPACE/.metadata/.plugins/myplugin folder [message #1950] Wed, 30 April 2008 15:11 Go to next message
Eclipse UserFriend
Originally posted by: jimmy.shi.justfly.cn

Hi,
I want to store some plug-in specific data into the workspace, I think the
..metadata/.plugins/.myplugin folder is a nice place to store the data. How
can I do it?
Re: How to store data in the $WORKSPACE/.metadata/.plugins/myplugin folder [message #1997 is a reply to message #1950] Wed, 30 April 2008 23:01 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Jimmy Shi wrote:
> Hi,
> I want to store some plug-in specific data into the workspace, I think
> the .metadata/.plugins/.myplugin folder is a nice place to store the
> data. How can I do it?

If you want to use a org.eclipse.core.runtime.Preferences object to
store simple name/value pairs, just call getPluginPreferences() and
savePluginPreferences() on your Plugin class. See the Javadoc of
Preferences to see what it can do.
If you want to store files, you can call getStateLocation() to get an
IPath that represents that plugin's metadata state location, and then do
various things with that (like create/read directories and/or files).

Hope this helps,
Eric
Re: How to store data in the $WORKSPACE/.metadata/.plugins/myplugin folder [message #566321 is a reply to message #1950] Wed, 30 April 2008 23:01 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
Jimmy Shi wrote:
> Hi,
> I want to store some plug-in specific data into the workspace, I think
> the .metadata/.plugins/.myplugin folder is a nice place to store the
> data. How can I do it?

If you want to use a org.eclipse.core.runtime.Preferences object to
store simple name/value pairs, just call getPluginPreferences() and
savePluginPreferences() on your Plugin class. See the Javadoc of
Preferences to see what it can do.
If you want to store files, you can call getStateLocation() to get an
IPath that represents that plugin's metadata state location, and then do
various things with that (like create/read directories and/or files).

Hope this helps,
Eric
Previous Topic:automating the Export Wizards-> Product Export
Next Topic:[pdebuild] exploding plugins
Goto Forum:
  


Current Time: Thu Apr 25 10:14:48 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