Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335759 - No diagnosis of proxy target model
Summary: No diagnosis of proxy target model
Status: CLOSED FIXED
Alias: None
Product: Acceleo
Classification: Modeling
Component: Core (show other bugs)
Version: 3.0.0   Edit
Hardware: PC Windows Vista
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 326536
Blocks:
  Show dependency tree
 
Reported: 2011-01-29 07:17 EST by Ed Willink CLA
Modified: 2011-03-30 08:50 EDT (History)
2 users (show)

See Also:


Attachments

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