Community
Participate
Working Groups
Steps to reproduce: 1. prepare: create two related models - create a new ECore "first.ecore" - model a new abstract EClass "A" - model another new EClass "B" and add a new EReference "R" with EType = A - set Containment of R to true - create another new ECore "second.ecore" - create a new EClass "C" that is not abstract and inherits from (implements) "A" - open second.ecore in default editor - right-click in empty space - "load resource..." - "browse workspace" and locate first.ecore - create a new first.genmodel for first.ecore and generate model and edit code - create new second.genmodel for second.ecore - right-click on root-node - "Referenced generator model" - select first.genmodel - both, the editor for genmodel as well as ecore-file should now show a tree that include all models (the editors may wait to load the referenced models until C is visible - generate model and edit code for second.genmodel 2. reproduce issue - debug as Eclipse Application with all models loaded - open ECP Navigator View - right-click -> Other... -> New Project... - right-click new project -> New Model Element -> select B - right-click on new instance of B -> ... You will notice that there is no entry "New C" ,or any other EClass that may be derived from A. It should not be necessary to add these entries manually, even though this is possible. Starting Point: In DynamicContainmentCommands, there is a method: IContributionItem[] getContributionItems(). In this method, getNewChildDescriptors() is only called for the EditingDomain of selectedME; however, it should be called for all relevant ones.
Today I tried this: http://ed-merks.blogspot.de/2008/01/creating-children-you-didnt-know.html, becauce I had a similar requirement. Setting the child creation extenders / extensible provider factory in the two genmodels (and providing both packages to ECP via extension point) worked fine. My super class (Resource in the example) has also been abstract.
Does that mean the issue can be closed?