Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Use commands from parent plugin
Use commands from parent plugin [message #1384141] Wed, 28 May 2014 08:25 Go to next message
Shane Mills is currently offline Shane MillsFriend
Messages: 9
Registered: May 2014
Junior Member
Hi there,

I have a plugin with abstract implementations containing stuff that is needed in many places. For instance I have an abstract DetailsPart implementation because all my models can be rendered equally.

Besides some Part implementations I also hav some Handlers that may be used by different fragment projects for example.

My problem is, that I cannot find a way to make Commands and Handlers, that I define in my abstract plugins fmodel fragment usable in fragment projects, that use my abstract plugin as host plugin. If I would create new Commands and Handlers in all fragments, they would match 100% an therefor be redundant.

At least the implementation can be reused, but I would like to reuse the Command and Handler hooks of my Application Model as well, so I dont have to create lots of redundant XML code.

Hopefully someone understands my concern despite my unpracticed english :)

Greetings and thanks :)
Shane
Re: Use commands from parent plugin [message #1384677 is a reply to message #1384141] Fri, 30 May 2014 09:54 Go to previous messageGo to next message
Simon Scholz is currently offline Simon ScholzFriend
Messages: 73
Registered: April 2012
Location: Germany
Member
Hello Shane,

in fact Fragments and Host-Plugins are merged together at runtime. So it is as if the Fragments were parts of the Host-Plugin.

Because of that you should be easily able to reuse those commands you defined in the Host-Plugin.

How do you exactly want to reuse the Commands and Handlers of the Host-Plugin?

Best regards,

Simon
Re: Use commands from parent plugin [message #1384848 is a reply to message #1384677] Mon, 02 June 2014 13:58 Go to previous messageGo to next message
Shane Mills is currently offline Shane MillsFriend
Messages: 9
Registered: May 2014
Junior Member
Hello Simon,

I am trying to do most of the UI work through the dev tools, so I am using the Application Model Editor to define Commands and Handler.

So I define a Command within my abstract fragment project and want to bind it to a handled menu item within one of the other fragments. In the user interface of the Application Model Editor there is a field to choose the Command that should be bound to the handled menu item. But here i can not choose a Command of the other fragments or the host-fragment.

I tried to modify the XML manually which did not work either.

thanks for your reply,

Shane
Re: Use commands from parent plugin [message #1695516 is a reply to message #1384848] Fri, 15 May 2015 14:40 Go to previous message
Shane Mills is currently offline Shane MillsFriend
Messages: 9
Registered: May 2014
Junior Member
By the way, I managed to solve this by importing the desired commands to the fragment.e4xmi I wanted to use them in.

Previous Topic:Unit test GUI for e4 RCP application
Next Topic:Make it possible to drag a viewpart to a place with no window, create and put it into a new window?
Goto Forum:
  


Current Time: Fri Apr 26 14:34:31 GMT 2024

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

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

Back to the top