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

Bug 335759

Summary: No diagnosis of proxy target model
Product: [Modeling] Acceleo Reporter: Ed Willink <ed>
Component: CoreAssignee: Project Inbox <acceleo-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: laurent.goubet, stephane.begaudeau
Version: 3.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Bug Depends on: 326536    
Bug Blocks:    

Description Ed Willink CLA 2011-01-29 07:17:47 EST
M4a

If the user meta-model fails to be resolved,

final EClassifier argumentType = template.getParameter().get(0).getType();

in AcceleoService.doGenerate has a proxy, which obviously doesn't work very well. It would be good to diagnose this rather than produce an empty result, that doesn't even overwrite a pre-existing result.
Comment 1 Laurent Goubet CLA 2011-01-29 13:49:59 EST
There's a chance this would be solved by used reporting resource loading errors as mentionned on bug 326536. I am still reticent on doing a resolveAll right off the bat, but this problem would most likely have been detected by EMF (resourceSet.getResources().getErrors()).
Comment 2 Stephane Begaudeau CLA 2011-03-30 08:50:03 EDT
We will check for a proxy here:
"final EClassifier argumentType = template.getParameter().get(0).getType();"

And ModelUtils will now report errors that have occurred during the loading.

And a new comment in the generated Java class will invite the user to check for proxies before the beginning of the generation if they have a problem with a resolveAll.