Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Can a Fragment extend a Fragment?(One fragment adding a part to a partstack in another fragment)
icon5.gif  Can a Fragment extend a Fragment? [message #1009861] Fri, 15 February 2013 21:55 Go to next message
Jo Jaquinta is currently offline Jo JaquintaFriend
Messages: 40
Registered: January 2013
Location: Boston
Member

So my main plugin defines the application model, with relatively little in it. Main it creates a PerspectiveStack with an ID. (Application.e4xmi, below)
Another plugin defines a fragment which extends the application model by adding a Perspective to the PerspectiveStack. (tools_fragment.e4xmi, below) It does this by giving the Element ID of the Perspective Stack and a Featurename of children. Under elements I add a Perspective. That Perspective defines different things, one of which is a PartStack with a specific ID.
So far, so good. The app comes up fine and I see my perspective.
Then I have a 3rd plugin that defines another fragment. (support_fragment.e4xmi, below) This defines a fragment with an Element Id that is what was used for the PartStack in the second plugin, a Feature Name of children, and several Elements that are parts. When I run the app, none of these parts appear.

What a I doing wrong? Is it not possible to extend a fragment with another fragment? Do I have to do something so that some sort of load order is set?


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jo Grant, Senior Software Engineer
Admin and Config Console Architect
OpenPages, IBM
Re: Can a Fragment extend a Fragment? [message #1010500 is a reply to message #1009861] Sun, 17 February 2013 13:40 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Well the problem most likely is that the bundles are processed in the
wrong order (which by default is random!) by the extension registry:

* Main-Bundle
* Parts-Bundle
* Perspective-Bundle

where as you'd require:

* Main-Bundle
* Perspective-Bundle
* Parts-Bundle

You can remove this randomness by adding dependency from your
Parts-Bundle to your Perspective-Bundle because we guarantee this order
when processing the contributions.

Tom

Am 15.02.13 22:55, schrieb Jo Jaquinta:
> So my main plugin defines the application model, with relatively little in it. Main it creates a PerspectiveStack with an ID. (Application.e4xmi, below)
> Another plugin defines a fragment which extends the application model by adding a Perspective to the PerspectiveStack. (tools_fragment.e4xmi, below) It does this by giving the Element ID of the Perspective Stack and a Featurename of children. Under elements I add a Perspective. That Perspective defines different things, one of which is a PartStack with a specific ID.
> So far, so good. The app comes up fine and I see my perspective.
> Then I have a 3rd plugin that defines another fragment. (support_fragment.e4xmi, below) This defines a fragment with an Element Id that is what was used for the PartStack in the second plugin, a Feature Name of children, and several Elements that are parts. When I run the app, none of these parts appear.
>
> What a I doing wrong? Is it not possible to extend a fragment with another fragment? Do I have to do something so that some sort of load order is set?
>
Re: Can a Fragment extend a Fragment? [message #1011544 is a reply to message #1010500] Tue, 19 February 2013 19:11 Go to previous message
Jo Jaquinta is currently offline Jo JaquintaFriend
Messages: 40
Registered: January 2013
Location: Boston
Member

That did it!
Is it worth printing some sort of error message when a fragment can't be resolved? Would one ever want to register a fragment against a non-existent UI element?


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jo Grant, Senior Software Engineer
Admin and Config Console Architect
OpenPages, IBM
Previous Topic:ISharedImages.IMG_DEC_FIELD_* not registered in 4.2
Next Topic:Application.e4xmi externalize strings
Goto Forum:
  


Current Time: Tue Mar 19 07:00:47 GMT 2024

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

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

Back to the top