| Summary: | When having two FigureRef to the same figure. generated code has 2 variables with same name | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] GMF-Tooling | Reporter: | Mickael Istria <mistria> | ||||
| Component: | Generation / Templates | Assignee: | Svyatoslav Kovalsky <kovalsky> | ||||
| Status: | NEW --- | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | borlander | ||||
| Version: | 2.4 | ||||||
| Target Milestone: | 3.0M3 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Slava, could you please add this use case to gmfgraph test suite? It should not be difficult to fix and the same fix will probably work for both bridge-time and codegen-time templates. Do you think this could be part of a 2.4.1 maintenance release? I think adding curly braces around line 45 of Children.xpt should be enough to fix that. I asked Slava to fix that "ad hoc", without introducing the differences for the generated code that is not explicily affected by problem.
But yes, if this is difficult enough, then it seems that
>adding curly braces around line 45 of Children.xpt
would fix the problem.
|
Created attachment 206774 [details] A sample GMF Graph highlighting the issue If in a FigureDescriptor, you have two FigureRef that references that same Figure, the generated code creates the same variable name for both figures. With the attached gmfgraph, you can see the IfFigure contains two FigureRefs to the diamond Figure. Generated code contains twice a diamond0 variable. A simple "Generate Figures plug-in" shows the issue.