Can a Fragment extend a Fragment? [message #1009861] |
Fri, 15 February 2013 21:55 |
|
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 |
Thomas Schindl 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 |
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03829 seconds