Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361897 - SubsetSupersetEObjectEList in org.eclipse.emf.facet.util.emf.core
Summary: SubsetSupersetEObjectEList in org.eclipse.emf.facet.util.emf.core
Status: ASSIGNED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EMF-Facet (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Nicolas Bros CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 361823
  Show dependency tree
 
Reported: 2011-10-25 04:55 EDT by Nicolas Bros CLA
Modified: 2020-05-01 11:26 EDT (History)
2 users (show)

See Also:
gdupe: juno+


Attachments
patch v0 (19.95 KB, patch)
2011-10-25 10:10 EDT, Nicolas Bros CLA
gdupe: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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-‘.