how to get workspace path in eclipse? [closed]

2019-06-19 00:19发布

问题:

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?

回答1:

You want:

ResourcesPlugin.getWorkspace().getRoot().getLocation().toString();


回答2:

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