Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359795 - [EFacet] Facets can't be correctly used when we extends an object of a parent meta-model
Summary: [EFacet] Facets can't be correctly used when we extends an object of a parent...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EMF-Facet (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: Gregoire Dupe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 359793
  Show dependency tree
 
Reported: 2011-10-04 03:46 EDT by Vincent Lorenzo CLA
Modified: 2020-05-01 11:27 EDT (History)
2 users (show)

See Also:
gdupe: indigo+
gdupe: juno+
gdupe: kepler+


Attachments
This patch corrects the bug (file FacetContext) (2.71 KB, patch)
2011-10-04 03:55 EDT, Vincent Lorenzo CLA
gdupe: iplog-
gdupe: review-
Details | Diff
This plugin provides a facet to reproduce easily the described bug (7.76 KB, application/octet-stream)
2011-10-04 04:40 EDT, Vincent Lorenzo CLA
gdupe: iplog-
Details
Another path proposition (1.66 KB, text/plain)
2011-10-04 15:23 EDT, Gregoire Dupe CLA
gdupe: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Lorenzo CLA 2011-10-04 03:46:35 EDT
Steps to reproduce : 
	1/ Create a facet which extends EObject
	2/ Add a facetReference to display the eClass of the EObject
	3/ Create a new table
	4/ Edit this table in another table
	5/ Apply the facet to this table
		-> the column is created with N/A.
		
	Note : we get the same kind of problem with the Papyrus Model Browser : When an uiCustom defined on EObject calls a facet defined on EObject, the facet is not applied for an UML element. The correction is the same in the 2 cases.
Comment 1 Vincent Lorenzo CLA 2011-10-04 03:55:46 EDT
Created attachment 204490 [details]
This patch corrects the bug (file FacetContext)

(1) I, Vincent Lorenzo, wrote 100% of the code I've provided.
(2) This code contains no cryptography
(3) I have the right to contribute the code to Eclipse.
(4) I contribute the content under the EPL.

Can you commit this patch for SR2 or for Juno?

Best Regards, 
-- 
Vincent Lorenzo
Comment 2 Vincent Lorenzo CLA 2011-10-04 04:40:45 EDT
Created attachment 204494 [details]
This plugin provides a facet to reproduce easily the described bug

(1) I, Vincent Lorenzo, wrote 100% of the code I've provided.
(2) This code contains no cryptography
(3) I have the right to contribute the code to Eclipse.
(4) I contribute the content under the EPL.
Comment 3 Gregoire Dupe CLA 2011-10-04 15:23:59 EDT
Created attachment 204546 [details]
Another path proposition

Vincent,

I do not understand the goal of your patch. The method org.eclipse.emf.ecore.EClass.isSuperTypeOf(EClass) should do a good job (excluding the case of EObject). That’s why I suppose that a test on EObject would be enough.

What do you think of my proposition?

Regards,
Grégoire
Comment 4 Vincent Lorenzo CLA 2011-10-05 03:49:02 EDT
Hi Grégoire, 
 you're right, my patch was too complex for that! Your test on EObject is efficient and sufficient.
 
 Regards, 
 Vincent
Comment 5 Gregoire Dupe CLA 2012-08-16 16:06:07 EDT
Comment on attachment 204546 [details]
Another path proposition

This patch doesn't cause any test regression.

I've then committed this patch.

Trunck: Committed revision 2664.
Branch 0_2_1: Committed revision 2665.
Comment 6 Gregoire Dupe CLA 2012-08-16 16:06:55 EDT
This bug can be marked has fixed.
Comment 7 Vincent Lorenzo CLA 2012-10-09 10:27:50 EDT
This bug can be marked as closed fixed.