Skip to main content



      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 11: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 19: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 19:01 Go to previous message
Eclipse UserFriend
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 May 01 22:14:54 EDT 2025

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

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

Back to the top