Menu

#1061 Var declartion not posible in new ST editor

1.8
closed-accepted
None
4DIAC-IDE
Bug
Normal
2015-11-18
2015-11-06
Zoitl Alois
No

In the new ST editor it is not posible to define variables in an algorithm such as:

VAR
i : BOOL;
END_VAR;

Discussion

  • Zoitl Alois

    Zoitl Alois - 2015-11-09

    working on the cset [fordiac-ide:c98960] I noticed that the problem is that internal var declarations store their type in an editional variable local type. However local vars are also inherited from our IEC 61499 VarDeclaration model entry. This model has a member called type of type string. The value of this is not set leading to the errormessage in the editor. In order to make this happen a quick fix would be to adjust the generated setLocalType function of the xtext model and set their also the type of the super classe. However I don't like this fix it seems to be too hacky.

    A better solution would be to merge localtype and type. But then the xtext parser would need to deliver a string and not an enum as it is now. This is however beyound my xtext knowledge.

     

    Related

    Commit: [c98960]

  • Zoitl Alois

    Zoitl Alois - 2015-11-17
    • assigned_to: Martin Jobst
     
  • Martin Jobst

    Martin Jobst - 2015-11-18

    Attached is a patch to fix type parsing for local variables in the new ST parser.
    The parser now refers the DataTypeLibrary when resolving types and correctly assigns the type attribte of VarDeclaration.

     
  • Monika Wenger

    Monika Wenger - 2015-11-18

    thank you for this patch it is added in cset[fordiac-ide:e3e532]

     
  • Monika Wenger

    Monika Wenger - 2015-11-18
    • status: open --> closed-accepted
    • Milestone: Backlog --> 1.8
     

Log in to post a comment.

Auth0 Logo