Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get Eclipse Workspace Location URI

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

like image 632
VamsiKrishna Avatar asked Jul 27 '12 17:07

VamsiKrishna


People also ask

How do I change the workspace path in Eclipse?

to a new location. Then, start Eclipse, select "Switch Workspace..." from the "File" menu and select the new workspace location.

How do I ask for workspace in Eclipse?

Click on Windows --> Preferences --> Search for Workspace --> Check "Prompt for workspace on startup" --> Click Apply ---> Click OK ---> Then File ---> Switch Workspace --> Choose your default Workspace --> Now restart eclipse.

What is the default workspace in Eclipse?

By default project location is current workspace of eclipse.


1 Answers

You want:

ResourcesPlugin.getWorkspace().getRoot().getLocation().toString();
like image 167
Chris Gerken Avatar answered Sep 27 '22 17:09

Chris Gerken