1_ My first problem is related to the customisation of the cross reference that links variable to loop. In fact, without any customisation , it is possible to write :
For i in table1;
For j in table2;
$i.attribute1;
$j.attribute2;
EndLoop
$j.attribute; // We are not in the j-loop
EndLoop
because the cross reference refers to all the loops of the model.
However, I want the variable to refer only to the loops that contain it. I guess that this is possible by implementing a method in the scopeProvider file, but I don't know how! Any idea?
2_ The second problem is due to a conflict between the fonction and the variable. In fact, if I write
For F in table;
$F.attribute;
EndLoop
xtext returns an error because it expects to have $FCT and didn't understand that in this context, the content is a variable. What do you suggest?