Reputation: 791
I am working on a plugin, which passes the location URI of current workspace to other method.
IWorkspace workspace = ResourcesPlugin.getWorkspace();
I am very new to Eclipse PDE. What method returns the URI location of workspace. for Ex if the workspace is C:\Eclipse\Workspace. i need the path C:\Eclipse\Workspace
Upvotes: 9
Views: 12293
Reputation: 9474
Are you sure you need workspace URL? The only thing you may rely is that it will contain .metadata folder - everything else may be located elsewhere:
My recommendation:
Upvotes: 6
Reputation: 16392
You want:
ResourcesPlugin.getWorkspace().getRoot().getLocation().toString();
Upvotes: 14
Reputation: 615
Get the absolute file system path of any resource:
IResource.getLocation()
Upvotes: 1