Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342037 - Generated code refers to wrong classes (package name used wrongly)
Summary: Generated code refers to wrong classes (package name used wrongly)
Status: NEW
Alias: None
Product: GMF-Tooling
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-06 11:40 EDT by Federico Tomassetti CLA
Modified: 2011-04-06 11:41 EDT (History)
0 users

See Also:


Attachments
MetaModel included by the principal one (898 bytes, application/octet-stream)
2011-04-06 11:40 EDT, Federico Tomassetti CLA
no flags Details
The principal MetaModel (3.15 KB, application/octet-stream)
2011-04-06 11:41 EDT, Federico Tomassetti CLA
no flags Details
The GmfGen file generating wrong code (6.98 KB, application/octet-stream)
2011-04-06 11:41 EDT, Federico Tomassetti CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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