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

Bug 410802

Summary: EMF-generated model code can't be compiled due to public inner Class of super types
Product: [Modeling] EMF Reporter: Alex Lagarde <alex.lagarde>
Component: CoreAssignee: Ed Merks <Ed.Merks>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: alex.lagarde
Version: 2.8.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 262382    
Bug Blocks:    

Description Alex Lagarde CLA 2013-06-14 07:04:31 EDT
As explained in the following post http://www.eclipse.org/forums/index.php/t/489066/ EMF generated code can contain compilation issues if it references EClasses with the same name as an Inner class of an extended Class (e.g. "Container" of MinimalEObjectImpl.

This issue is about fixing the code generation to take this into account, if possible in a generic way (and not juste handle the "Container" exception.

Although it is possible to work around this bug by marking code as @generated NOT, it can be quite annoying as it means that as soon as you generate CDO-Native code, you cannot have an EClass named "Container" without having to put @generated NOT annotations.

Related issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=262382
Comment 1 Ed Merks CLA 2013-07-12 13:32:16 EDT
The fix has been committed to master

http://git.eclipse.org/c/emf/org.eclipse.emf.git/commit/?id=01d00e391677a8039cd0705240c3ff805dc26129

Note that I deprecated the old method, but still delegate to it so as not to break API and so as not to break clients who have overridden that method.
Comment 2 Ed Merks CLA 2013-07-12 13:44:53 EDT
Oops, closed the wrong bug.  Sorry.
Comment 3 Ed Merks CLA 2013-08-10 01:38:13 EDT
The fix was accidentally committed as part of 

https://bugs.eclipse.org/bugs/show_bug.cgi?id=413288

so is committed for 2.9 maintenance and master.
Comment 4 Ed Merks CLA 2013-09-10 02:15:09 EDT
The fix is available in the 2.9.1 service release or a 2.10 milestone build.