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

Bug 352285

Summary: Model object called 'Abstract' causes type hierarchy problems
Product: [Modeling] EMFT Reporter: Michael Houston <schmeeky>
Component: TexoAssignee: Martin Taal <mtaal>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Michael Houston CLA 2011-07-17 06:20:04 EDT
Build Identifier: Build id: M20100909-0800 (EMFT Texo (Incubation)	0.1.0.v201107070719	org.eclipse.emf.texo.feature.group)

If you generate Texo model code from an ecore model containing an object called Abstract, it creates an inconsistent type hierarchy due to a conflict between the generated AbstractModelObject and the class of the same name in the Runtime.


/** 
	 * The adapter/wrapper for the EClass '<em><b>Abstract</b></em>'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated 
	 */
	public static class AbstractModelObject<E extends Abstract> extends
			AbstractModelObject<E> {
		/**
		 * @generated
		 */
		public EClass eClass() {
			return CommuniscriptModelPackage.INSTANCE.getAbstractEClass();
		}


Reproducible: Always

Steps to Reproduce:
1. Create an eCore model with an object called 'Abstract'
2. Generate model code using Texo
3. Generated code will fail to compile
Comment 1 Martin Taal CLA 2011-08-26 01:31:58 EDT
I changed the way imports are resolved in generated source files. This solves this issue. Any recent Texo build (for example mid august and later) will have this solution.