Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » One Handler for multiple MenutItem
One Handler for multiple MenutItem [message #513819] Thu, 11 February 2010 07:16 Go to next message
Walter Mising name is currently offline Walter Mising name
Messages: 126
Registered: July 2009
Senior Member
How do I get the control of a menu item that was clicked ?

<children xsi:type="application:DirectToolItem" id="Btn1"
URI="platform:/plugin/test/handler.ClickHandler" label="Test_1"
iconURI="platform:/plugin/test/icons/Test_1.png"/>
<children xsi:type="application:DirectToolItem" id="Btn2"
URI="platform:/plugin/test/handler.ClickHandler" label="Test_2"
iconURI="platform:/plugin/test/icons/Test_2.png"/>

The objective is to have 1 ClickHandler and then take action based on the
button clicked.
I would prefer to use "id" to differentiate the button clicked.

Any pointers would help.

Thanks,
Best Regards,
Walter G. Prabhakar.
Re: One Handler for multiple MenutItem [message #513829 is a reply to message #513819] Thu, 11 February 2010 12:30 Go to previous message
Walter Mising name is currently offline Walter Mising name
Messages: 126
Registered: July 2009
Senior Member
Oops.... wrong newsgroup. Can the moderator remove it.
I have posted it in e4 already.

Thanks.

"Walter Prabhakar" <kwchess@gmail.com> wrote in message
news:hl0rut$fid$1@build.eclipse.org...
> How do I get the control of a menu item that was clicked ?
>
> <children xsi:type="application:DirectToolItem" id="Btn1"
> URI="platform:/plugin/test/handler.ClickHandler" label="Test_1"
> iconURI="platform:/plugin/test/icons/Test_1.png"/>
> <children xsi:type="application:DirectToolItem" id="Btn2"
> URI="platform:/plugin/test/handler.ClickHandler" label="Test_2"
> iconURI="platform:/plugin/test/icons/Test_2.png"/>
>
> The objective is to have 1 ClickHandler and then take action based on the
> button clicked.
> I would prefer to use "id" to differentiate the button clicked.
>
> Any pointers would help.
>
> Thanks,
> Best Regards,
> Walter G. Prabhakar.
Previous Topic:Filter cyclic service registrations in EventHook
Next Topic:DynamicImport-Package creates bundle leak?
Goto Forum:
  


Current Time: Sun Oct 26 05:27:12 GMT 2014

Powered by FUDForum. Page generated in 0.02515 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software