|Error on retrieval of features in *Generator.xtend [message #1818693]
||Mon, 23 December 2019 12:50
| Ebert Schoofs
Registered: December 2019
I'm trying to generate an DSL written in xtext to java using the provided classes and files, but can't retrieve one specific future of one specific rule.|
The xtext rule of a Room looks as follows:
('cells' ':' '[' cells+=[Cell] (',' cells+=[Cell])* ']')
But when I try to retrieve the cells in *Generator.xtend, it returns an empty array.
Room «room.name» = new Room();
«FOR cell : room.cells»
Cell «cell.name» = this.getCellFromLoc(«cell.loc_x»,«cell.loc_y»);
A room is defined in my DSL as follows:
cells : [c00,c01,c02]
Other features like the name, or the cells of other rules can be retrieved fine. The cells are surely added to the room, because in the validator we can retrieve them fine.
I'm sorry of this is a duplicate question, but I couldn't find it anywhere, not even in the FAQ.
Powered by FUDForum
. Page generated in 0.01960 seconds