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

Bug 331498

Summary: Overrides are writing on top of each other between modules
Product: [Modeling] Acceleo Reporter: Glenview Jeff <junk>
Component: CoreAssignee: Project Inbox <acceleo-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: junk
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Test case that shows what appears to be the bug none

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