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

Bug 315902

Summary: importing EGL scripts into other EGL scripts doesn't work
Product: [Modeling] Epsilon Reporter: Balogh Endre <iglo3>
Component: CoreAssignee: Dimitris Kolovos <dkolovos>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: louis
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
The archive contains the egl files, model and metamodel needed to reproduce the bug. (run driver.egl) none

Description Balogh Endre CLA 2010-06-06 07:30:34 EDT
Created attachment 171216 [details]
The archive contains the egl files, model and metamodel needed to reproduce the bug. (run driver.egl)

Overview: 

One EGL file contains template operations which the other script would use. The import doesn't work.

Steps to Reproduce: 
1) define a template operation in an EGL file
2) import that EGL script into another EGL script, use the operation previously defined, and run it

Actual Results: 

Running fails with the error message:
Method '(method name)' not found


Expected Results: 

The import should work and the operation should be executed, or at least the import should be validated.
Comment 1 Louis Rose CLA 2010-06-07 07:13:15 EDT
Hi Endre,

Thanks for reporting. The problem you're encountering is a regression (importing EGL files used to work in an earlier version of EGL). I'm sorry that you ran into the problem.

I've identified the root cause and am about to check-in a solution. I've also added a test to cover this case, which should help to prevent future regressions.

For our reference, the cause was the parse method of EglModule, which assumed the context field would be non-null. When EOL resolves imports, it uses a 0-arg constructor of EglModule, and context is set to null. I've moved the logic that depends on context to the execute method of EglModule, which I believe is a better home.

Cheers,
Louis.
Comment 2 Louis Rose CLA 2010-06-07 07:14:07 EDT
Committed to SVN. Assigning to Dimitris for build integration - thanks!
Comment 3 Dimitris Kolovos CLA 2010-06-10 10:16:59 EDT
Fixed in interim version 0.8.9.201006101638
Comment 4 Dimitris Kolovos CLA 2010-11-25 08:15:46 EST
Fixed in 0.9.0.