I want to get the projects selected in the project or package explorer.
If i select a project Hello in package explorer then I should get Hello as the return value.
If I select two projects, Hello and World project then I should get a return value containing Hello, World in it.
I want a java code for the above. And I am doing this in eclipse plugin.
Asked
Active
Viewed 242 times
-1

Destructor
- 3,154
- 7
- 32
- 51
-
Whoever downvoted the question, please read the entire question. I hope this forum is not just for Hi-Fi questions!! – Destructor Nov 25 '13 at 18:47
1 Answers
0
Use an ISelectionListener
and register it at the ISelectionService
, then you'll get all selections of all views and editors - not only from package explorer.
See

isnot2bad
- 24,105
- 2
- 29
- 50
-
Thanks a lot!!! I got the exact way here: http://stackoverflow.com/questions/6892294/eclipse-plugin-how-to-get-the-path-to-the-currently-selected-project – Destructor Nov 25 '13 at 18:46