开发者

Eclipse plugin developing

开发者 https://www.devze.com 2022-12-17 02:02 出处:网络
I\'m developing an Eclipse pluging which is executed when I right clik on a project in Project Explorer view and choose my option in the menu. The thing is that I need to get location of the selected

I'm developing an Eclipse pluging which is executed when I right clik on a project in Project Explorer view and choose my option in the menu. The thing is that I need to get location of the selected project. I mean location on disk. When you right click on any project and go to Properties there is always Location listed. Do you know any way to开发者_JAVA技巧 get it programatically?

Thanks in advance for your help and commitement.


If you have the name of the currently selected project

IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("foo");
String fullpath = project.getFullPath();

You can also get the project through the selection service: see this SO question as an example.

0

精彩评论

暂无评论...
验证码 换一张
取 消