Replies: 1 comment 2 replies
-
Hey @Greglar4, unfortunately the best way would be to do it manually - i.e. for each type of different edit, generate the respective code change and edit the text document (e.g. through the vscode API). We have thought about getting a generic serialization solution into the framework (i.e. generate DSL text from abitrary ASTs), but that's a lot of work and we ourselves (i.e. the people contributing to Langium) currently don't have a use case for it. You would mostly use the CST based API (which contains a bunch of offset/line/column information) available through the |
Beta Was this translation helpful? Give feedback.
-
Hello,
In our application we are using Langium to generate a model. We are also implementing various editors, for example a table editor, that displays the model to the user, and we would like for the user to be able to edit the model in the table, and have these changes reflected in the DSL content.
I see there is a way to deserialize JSON to an AST, however, I don't see a way to update the DSL content based on a given AST.
Is there a recommended way of updating the content of a DSL document based on external changes?
Thank you,
Greg
Beta Was this translation helpful? Give feedback.
All reactions