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
  • 11,553
  • 8
  • 64
  • 88
Scary Wombat
  • 44,617
  • 6
  • 35
  • 64
9

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

Omar HossamEldin
  • 3,033
  • 1
  • 25
  • 51