|Getting active tableviewer in Handler [message #763502]
||Fri, 09 December 2011 16:45
| Ricky de Klerck
Registered: January 2011
Yet another question.. I have a menu on my tableviewer so when I do a right click I can choose to delete an object. In the handler I want to know which tableviewer is clicked so I can retrieve the input.. On this input I want to do some modifications. Is this possible?
Thanks in advance.
Ricky de Klerck
|Re: Getting active tableviewer in Handler [message #764581 is a reply to message #764562]
||Mon, 12 December 2011 08:26
| Daniel KrÃ¼gler
Registered: July 2009
On 2011-12-12 13:42, Arthur wrote:|
> Are you sure that you really need exactly tableviewer? I think it's
> litle bit wrong from eclipse selection concepts. I mean that you can
> provide selection exactly from table viever and in this case selection
> will be element which you want to handle.
I completely agree with Arthur and therefore recommend to use
HandlerUtil.getActiveMenuSelection[Checked], depending on your needs. If
it is important, that you get the control in focus, register your
(table) control via IFocusService, and use the variables
activeFocusControl and activeFocusControlId via HandlerUtil.getVariable
inside your handler.
HTH & Greetings from Bremen,
Powered by FUDForum
. Page generated in 0.01500 seconds