Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » at fragment can I use command or handle of host ?
at fragment can I use command or handle of host ? [message #725770] Thu, 15 September 2011 18:03 Go to next message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
Registered: July 2009
Senior Member
Hi,

In my application test I've created one application and 2 fragment projects.
In the Application I've added one PerspectiveStack, a WindowTrim with one toolbar.

Both fragments are contributing a perspective to PerspectiveStack and a HandledToolItem to the Toolbar. It seems that this contribution is working properly.

Now I want that the contributed button calls a command to change the current Perspective. So, I've added one Command and Handler (that should call a method to do this change ) to the Host.


Well, but when I went to the fragments I couldn't see the command and handler created from Host. So I think I can't use it...

should I create a Handle and Command in each fragment ?

another question, how could I create a kind of parameterized command where I could pass the perspective that I want to be shown?

thanks for any tip

regards

Cristiano
Re: at fragment can I use command or handle of host ? [message #725785 is a reply to message #725770] Thu, 15 September 2011 18:56 Go to previous message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
Registered: July 2009
Senior Member
nice... one challenge done.

Now I know it is possible to reuse peaces from the host. You just need to 'Import' desired peace into the fragment model.
In my case, I've import the command and handle and then select it in the HandledToolItem ... Smile cool

but I still need to learn how to deal with command parameters...
Previous Topic:How to update menu after uninstall fragment contribution bundle ?
Next Topic:Perspective Switcher Bar in e4
Goto Forum:
  


Current Time: Thu Apr 25 20:28:28 GMT 2024

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

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

Back to the top