I have a ListViewer in my eclipse-plugin, I want to do some work when user double click on the items in that ListViewer.
I had attached a doubleClick listener with my ListViewer instance, but it will be fired when I double click on anywhere inside the ListViewer
Check the current selection inside your listener. Like in the following code:
Remember that the selection for ListView (and TableViewer, ComboViewer, and TreeViewer) is always a IStructuredSelection..