Community
Participate
Working Groups
The context menu of a Categorization's Category does not show all possible view model elements that can be created as a child of the category. For instance, Group, TableControl and Stack Layout are missing.
The reason for the missing child elements results from a combination of multiple reasons: 1. The VCategory does not extend VContainer or another type from the core view.ecore that needs child descriptors for VContainedElements. 2. Child descriptors are provided by child creation extenders. These are registered for a specific namespace URI of an EPackage. All our View Model Extensions are only registered to the NS URI of the view.ecore. Consequently, these child creation extenders are not directly known to the adapter factory of the categorization edit bundle. 3. For other view model elements (like the vertical layout) that extend proper elements from the view.ecore, point 2 is no problem because an element also gets all child creation extenders of their super classes. However, Category's super class in the view.ecore is VElement which only gets child creation extenders for packages containing VAttachments. 4. Even if we get all relevant child creation extenders manually (like in the ChildrenDescriptorCollector) we cannot get the child descriptors. The reason for this is that these extenders again only return the child descriptors for types known to them and their super types. Consequently, we again only get the child descriptors for VElement. One idea to circumvent these problems would be to get all child descriptors for a VContainer. However, for this we would need an instance of VContainer (which is abstract) or one of its sub-types. Furthermore, it needs to be in the correct editing domain and the child descriptors would have to be manually adapted to the VCategory because they use a specific EReference. In conclusion, this does not seem like a good idea if it's even possible. The cleaner solution would be to change VCategory to be a VContainer (which it should have been from the start). However, this would need a custom migration.
Decision: For now the additional child descriptors are gathered by getting the descriptors for a VerticalLayout and transforming them to fit the VCategory. For 2.0.0, VCategory will extend VContainer.
New Gerrit change created: https://git.eclipse.org/r/124001
REGRESSION INFORMATION Summary of the critical part of the change: There are more entries in the Category's context menu in the View Model Editor. Potential regressions: User could create unexpected elements in the view model Affected areas / use cases Editing view models in the view model editor Things that shall be tested All needed context menu entries are still there. There are no unwanted context menu entries.
Gerrit change https://git.eclipse.org/r/124001 was merged to [develop]. Commit: http://git.eclipse.org/c/emfclient/org.eclipse.emf.ecp.core.git/commit/?id=87bdb51cf3bf8ae17f9d347f8d30e81d610dde26
*** Bug 535112 has been marked as a duplicate of this bug. ***