Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340588 - Least common supertype
Summary: Least common supertype
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EMF-Facet (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nicolas Bros CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-21 13:03 EDT by Nicolas Bros CLA
Modified: 2020-05-01 11:27 EDT (History)
2 users (show)

See Also:
nicolas.bros: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Bros CLA 2011-03-21 13:03:05 EDT
We need a method in EMF Facet to compute the least common supertype of a set of metaclasses. That is, the most derived  type that is a supertype of all the given classes.

This is needed in order to apply the "visible" customization on the most precise type of all the model elements in a column of the table.
Comment 1 Nicolas Bros CLA 2011-03-21 13:24:56 EDT
Committed in revision 443:
org.eclipse.emf.facet.util.emf.core.internal.EMFUtils
and tests in:
org.eclipse.emf.facet.util.emf.core.tests.UtilEMFCoreTests
Comment 2 Gregoire Dupe CLA 2011-03-23 08:57:25 EDT
Hi,

The warning in the class org.eclipse.emf.facet.util.emf.core.internal.EMFUtils has to be fixed.

Regards,
Gregoire Dupe
Comment 3 Nicolas Bros CLA 2011-03-23 11:27:00 EDT
I fixed the warning.
Comment 4 Gregoire Dupe CLA 2011-03-30 04:37:34 EDT
Hello,

A least, two tests are missing :
 - check that when no common super type exists, EObject is returned ;
 - check that the method work properly with more than one metamodel.

Regards,
Gregoire
Comment 5 Nicolas Bros CLA 2011-04-04 12:00:11 EDT
I added tests in revision 492, and changed the implementation to return the EObject EClass instead of null.
Comment 6 Gregoire Dupe CLA 2011-06-08 10:18:34 EDT
This bug can be closed.