9

I am doing to study about PDE(Eclipse Plugin Project).

I need to get workspace path.

My text widget(swt) should to be set current workspace path.

How to get workspace path in eclipse?

user3639147
  • 103
  • 1
  • 1
  • 4
  • possible duplicate of [How to tell Eclipse Workspace?](http://stackoverflow.com/questions/4332943/how-to-tell-eclipse-workspace) – Leo May 16 '14 at 02:05
  • Here is an answer I found http://ispecsoft.com/Taught1/post/2016/05/26/How-to-find-Eclipse-Project-workspace-location.aspx – CA Martin May 27 '16 at 19:45

2 Answers2

29

You want:

ResourcesPlugin.getWorkspace().getRoot().getLocation().toString();
Lii
  • 10,777
  • 7
  • 58
  • 79
Scary Wombat
  • 43,525
  • 5
  • 33
  • 63
9

File -> Switch Workspace -> Other the shown directory is your current workspace

Omar HossamEldin
  • 2,895
  • 1
  • 22
  • 49