Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 361897

Summary: SubsetSupersetEObjectEList in org.eclipse.emf.facet.util.emf.core
Product: z_Archived Reporter: Nicolas Bros <nicolas.bros>
Component: EMF-FacetAssignee: Nicolas Bros <nicolas.bros>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P2 CC: emft.facet-inbox, gdupe
Version: unspecifiedFlags: gdupe: juno+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 361823    
Attachments:
Description Flags
patch v0 gdupe: iplog-

Description Nicolas Bros CLA 2011-10-25 04:55:40 EDT
Users expect to be able to add Facets to a FacetSet through the "facets" reference, instead of the "eClassifiers" reference.

To make it possible, FacetSet#getFacets should return an implementation of EList that works as a subset of the eClassifiers list.

Such an implementation can already be found in UML2. See:
org.eclipse.uml2.common.util.SubsetSupersetEObjectEList and its subclasses.

This implementation could be copied into org.eclipse.emf.facet.util.emf.core so that it can be used in the EFacet2 metamodel and other EMF Facet metamodels.
Comment 1 Nicolas Bros CLA 2011-10-25 10:10:39 EDT
Created attachment 205919 [details]
patch v0

In fact the UML2 classes cannot be used since both the subset and superset lists would need be changed for it to work.

So I started implementing a "type" subset list, first as an implementation of EList from scratch, and then I tried extending AbstractEList to inherit common behavior. But this is a non-trivial and error-prone undertaking, which warrants ample testing before it can be used with confidence.

So I am attaching a first version of this implementation, that I will complete when I have time.
Comment 2 Gregoire Dupe CLA 2018-05-22 08:29:48 EDT
Comment on attachment 205919 [details]
patch v0

According to the comments, this patch has not been commited, that why I'm tagging it with ‘iplog-‘.