views:

19

answers:

1

This is a question specifically about plugin development for the Eclipse platform:

I need to implement persistence without hardcoding the name of the datastore I am using. I want to be able to have multiple instances of eclipse with my plugin running at the same time with independent datastores.

One way of doing this would be to use the file path of the workspace to generate/find the name of the datastore relating to that particular workspace.

I have tried org.eclipse.core.resources.ResourcesPlugin.getWorkspace(), but this doesn't seem to have a way to get that string.

To avoid any confusion, I am aware of -data and -showlocation - I want to access the text of showlocation at runtime in an eclipse plugin.

I am using eclipse 3.5.2 for my current project.

Thanks in advance!

+1  A: 

This is from a news list that's a few years old now, but you could try:

Platform.getLocation();
Ash
That's brilliant, thanks!
Matt