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

Bug 342037

Summary: Generated code refers to wrong classes (package name used wrongly)
Product: [Modeling] GMF-Tooling Reporter: Federico Tomassetti <f.tomassetti>
Component: CoreAssignee: Project Inbox <gmp.gmf-tooling-inbox>
Status: NEW --- QA Contact:
Severity: major    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
MetaModel included by the principal one
none
The principal MetaModel
none
The GmfGen file generating wrong code none

Description Federico Tomassetti CLA 2011-04-06 11:40:05 EDT
Build Identifier: 20110218-0911

The code generated from GMF refers to classes from the metamodel in this way:
<EPackageName>.<EClassName>

i.e. Navigation.Page instead of Page

it try also to import the whole package:

import it.polito.softeng.momaapp.metamodels.Navigation;

while that package contains the actual classes generated for the metamodel (I set the "Base Package" option in the genmodel).

I don't know if the problem is related to the fact that the metamodel refer to another metamodel.

Reproducible: Always

Steps to Reproduce:
1.Generate from the given gmfgen file
Comment 1 Federico Tomassetti CLA 2011-04-06 11:40:52 EDT
Created attachment 192657 [details]
MetaModel included by the principal one
Comment 2 Federico Tomassetti CLA 2011-04-06 11:41:13 EDT
Created attachment 192658 [details]
The principal MetaModel
Comment 3 Federico Tomassetti CLA 2011-04-06 11:41:54 EDT
Created attachment 192659 [details]
The GmfGen file generating wrong code