Community
Participate
Working Groups
Currently, when doing "New Child" in the model browser, only the metaclasses from the Resources in the editor's ResourceSet are proposed. There should be a way to load a metamodel so that instances of its EClasses can be created.
I added a menu item in the "New Child" menu for loading a metamodel (in revision 3327).
"New child" feature is driven by types on EReferences. So all metaclasses referenced, and sub-metaclasses (exploring EPackage.Registry), could be automatically proposed, i think, without explicit "load metamodel" user action (except for references to "EObject")...?
I fear the list could become crowded with metaclasses from metamodels the user doesn't know or care about. But maybe this could be solved by adding a filter that would select everything by default, and could be modified by the user to constrain the list to the subset he's interested in.
Hi, > But maybe this could be solved by adding a filter that would select everything > by default, and could be modified by the user to constrain the list to the > subset he's interested in. This filter may be a browser's preference. When the filtering would not be enable, the "Load metamodel" action should be disable or hidden. Gregoire
I modified the "New Child" menu so that it is built from all metaclasses in the EPackage.Registry. Since loading the entire EPackage.Registry takes a few seconds the first time, I made the menu even more lazy by computing the list only when the sub-menu is opened, so that the root context menu still appears quickly. I tested it on a few models, and it seems to be working nicely. So, I don't see a need for a filtering dialog for now. Committed in revision 3331.
The bug has been fixed in the latest revisions.