Skip to main content



      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 16:55 Go to next message
Eclipse UserFriend
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 #1010500 is a reply to message #1009861] Sun, 17 February 2013 08:40 Go to previous messageGo to next message
Eclipse UserFriend
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 14:11 Go to previous message
Eclipse UserFriend
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?
Previous Topic:ISharedImages.IMG_DEC_FIELD_* not registered in 4.2
Next Topic:Application.e4xmi externalize strings
Goto Forum:
  


Current Time: Wed Jul 23 15:18:37 EDT 2025

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

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

Back to the top