Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to add a new file
How to add a new file [message #459976] Sat, 09 December 2006 14:08 Go to next message
Eclipse UserFriend
Originally posted by: florianwendland.freenet.de

Hello all,

what's the common way, to store, for example a new user profile, in the
bundle.

With

FileLocator.find(Platform.getBundle(Activator.PLUGIN_ID),new
Path("profiles"+File.separator+"florian.profile"), null)));

I get the default profile. Now, I want, that other users are able to
store their profiles into PLUGIN/profiles/newProfile.profile.

Thx
Florian
Re: How to add a new file [message #459978 is a reply to message #459976] Sun, 10 December 2006 05:27 Go to previous message
Eclipse UserFriend
The bundle is really a read-only place, not a read-write place. You want to use Plugin.getPluginStateLocation() for a place that you can persist data once it's been changed. Of course, you can have a default one in your bundle to be loaded if the user doesn't have a profile, but you should look at the state to store persistent/changeable data.

The Bundle API doesn't have anything for inserting new files into the bundle at run-time, because it's not a supported use of bundles.

Alex.
Previous Topic:Classpath during build with plugin
Next Topic:How to locate files?
Goto Forum:
  


Current Time: Thu Mar 20 15:14:52 EDT 2025

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

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

Back to the top