As Eclipse’s plug-in developer I often ask my self: what is the current workbench selection ?? Developers may need such information for example when they want to update a given view according to an other view selection but don’t know what the provided selection exactly is or when creating a new custom Selection provider. It can also be useful for simple debug purpose.
To answer this question I wrote a simple plug-in adding a new view to my workbench showing the content of the current selection in a simple JFace TableViewer.
The view is added to the PDE category :
Here is what it looks like when two Java methods are selected in the outline view :
May be I missed something and such information is already available somewhere in the PDE … ?? If Yes, please let me know.


April 29, 2008 at 9:56 pm |
Yes I’m afraid it is already available (except if the “toString()” is not available out of the box) thanks to the wonderful PDE Spy!
Just hit ALT+SHIFT+F1 and close your eyes
April 29, 2008 at 10:17 pm |
Plug-in Spy (ALT+SHIFT+F1) should tell you
April 29, 2008 at 11:02 pm |
Yes, it seem like you missed PDE Plug-in Spy. Try Alt-Shift-F1 on your selection in Eclipse 3.4
April 30, 2008 at 6:07 am |
Thanks for your answers.
In fact I am working with Eclipse 3.3.1.1, is Spy available for this release ?
Regards
Manu
April 30, 2008 at 7:26 pm |
Eclipse Spy only available 3.4M6
May 5, 2008 at 8:03 am |
I tried to checkout the new org.eclipse.pde.runtime source code using CVS. Sadly the plug-in doesn’t compile … seems it is using a lot of new feature from 3.4M6.
I guess it means I can’t use Spy in 3.3.XXX … Is it right or is there any “workaround” to use spy in 3.3 ??
Thanks
Manu