Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331498 - Overrides are writing on top of each other between modules
Summary: Overrides are writing on top of each other between modules
Status: CLOSED WORKSFORME
Alias: None
Product: Acceleo
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-01 00:51 EST by Glenview Jeff CLA
Modified: 2010-12-02 00:15 EST (History)
1 user (show)

See Also:


Attachments
Test case that shows what appears to be the bug (6.61 KB, application/zip)
2010-12-01 22:13 EST, Glenview Jeff CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Glenview Jeff CLA 2010-12-01 00:51:25 EST
Build Identifier: M20100211-1343

I believe I may have run into another more serious bug. Before I spend the time to enter simplified code, I'll explain briefly and you can let me know if you've seen this and/or tested this scenario.

I have what should be a common scenario. There are two modules (say A and B) that extend a common base module C. Each of the two modules A and B override the same template T in the base module C.  T has two parameters if it matters.

What appears to be a bug is that I'm actually getting A's overridden T output in B instead of B's overridden T output.

Thanks,
Jeff

Reproducible: Always

Steps to Reproduce:
See Details
Comment 1 Glenview Jeff CLA 2010-12-01 22:13:56 EST
Created attachment 184320 [details]
Test case that shows what appears to be the bug
Comment 2 Glenview Jeff CLA 2010-12-01 22:14:55 EST
I created a small project (attached) that demonstrates the bug/problem. 

Once you get everything built and you execute main.mtl, note that NameA.java ends up incorrectly having the line execute body:

temBExecute(anItemHolderName)


instead of

ItemAExecute(anItemHolderName)



Thanks!
Jeff
Comment 3 Glenview Jeff CLA 2010-12-02 00:15:27 EST
Please disregard this problem.  I think it was due to my misunderstanding of how inheritance works in Acceleo/MTL.  I fixed the problem by adding the specialized Items: ItemA, ItemB to the parameter list of the problematic templates.  

I think I was thinking of modules as similar to Java classes and expecting the overloading to work throughout the module automatically.

Thanks,
Jeff