|
Re: MApplication.getDescriptors() returns an empty list [message #1043872 is a reply to message #1041138] |
Thu, 18 April 2013 08:06 |
Eclipse User |
|
|
|
In a pure e4 context, defining a MPart does not automatically mean defining a MPartDescriptor. MPDs are different things in terms of model elements. The MApplication#getDescriptors() will return the list of MPartDescriptors that were explicitly defined, be it programmatically or through the tooling editor.
|
|
|
|
|
|
Re: MApplication.getDescriptors() returns an empty list [message #1048273 is a reply to message #1048250] |
Wed, 24 April 2013 08:42 |
Eclipse User |
|
|
|
No, no don't do it that way. When I say parent I don't mean the parent in the left-side tree in the editor. Every model element you add in the fragment has to have a parent in the main application model. Suppose you have two part stacks in the main model and you add a part through a fragment. In order to resolve ambiguity (which of the two part stacks you should add the part to?) you supply the ID of the parent model element (the correct part stack). Add the descriptor but in the model fragment metadata add it as a 'child' (feature) of your MApplication (supply the MApp's id and 'descriptors' featurename).
Ultimately it should look something like :
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_hmhn4Ky6EeKLN_c01nrL9A" featurename="descriptors" parentElementId="org.eclipse.e4.ide.application">
<elements xsi:type="basic:PartDescriptor" xmi:id="_hmhn4ay6EeKLN_c01nrL9A" elementId="popupmenutest.partdescriptor.0"/>
</fragments>
|
|
|
Powered by
FUDForum. Page generated in 0.03668 seconds