1

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 get it programatically?

Thanks in advance for your help and commitement.

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.