Arguments Reversed

Issue #239 resolved
Calem Bendell created an issue

Fascinatingly, the arguments for the generated code for the create "MinuetoFrame" are reversed when I generate code for this app.

Code: MinuetoFrame(true, 480, 640);

reversedmessage.png

Comments (7)

  1. Matthias Schoettle

    I used the woven minueto and added that call (it was not there) to an operation in App.

    I get the following code:

    window = new MinuetoFrame(640, 480, true);
    
  2. Calem Bendell reporter

    Note: My Luna reverses. Mathias' Luna puts the boolean in the middle.

    Seems to be an Eclipse version error.

  3. Matthias Schoettle

    The reason the order is random is because the reference to arguments in the metamodel is not ordered. This was done, because we provide a mapping from the formal to the actual parameter. However, right now, the order is still used.

    We should either change it to an ordered reference or the code generator has to convert it to a sequence or ordered set.

  4. Matthias Schoettle

    Resolved issue #239: Made Message.arguments ordered such that when accessing it in the code generator using Acceleo a Sequence (or OrderedSet) will be returned by default.

    In general the idea was to just have a mapping from formal to actual parameter, however, we always use the original ordering, so it makes sense to have it ordered.

    → <<cset 4632ac932d37>>

  5. Log in to comment