Replies: 2 comments 1 reply
-
|
Hey @Greglar4, I haven't encountered this behavior so far in Langium, so I'm unsure what could trigger this. Do you have a reproducible example that could be used to debug this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Sadly I don't yet. I can continue debugging to try and figure out what
exactly triggers this to happen, and then hopefully make a reproducible
example from that knowledge.
…On Fri, Mar 6, 2026, 7:40 PM Mark Sujew ***@***.***> wrote:
Hey @Greglar4 <https://github.com/Greglar4>,
I haven't encountered this behavior so far in Langium, so I'm unsure what
could trigger this. Do you have a reproducible example that could be used
to debug this?
—
Reply to this email directly, view it on GitHub
<#2127 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD6BIA2PCNIOOL7AEYVCOBD4POKZVAVCNFSM6AAAAACWKCJW4GVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMMBTGAYDQMI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I work on building a VS Code/Theia app which uses Langium. We also provide other editing UIs, such as table editors, which display the Langium models in tabular form, and edits to the table trigger text changes to the Langium documents.
We noticed that sometimes when editing the table, the edits lead to invalid documents. We first thought that this was simply an error with how we translate table edits to text changes in the Langium document, but while debugging, we noticed that sometimes some CstNodes for the Langium document have ranges which do not agree with the other properties of the CstNode.
I've attached some screenshots of the debugger variables that show this.
Note that in the first image, the range starts at line 4, character 23, and ends at line 4, character 29. However, the length property is 3, and the text property is the three characters "VM3". Additionally, from the text of the text document for the Langium document, line 4 does not even have 29 characters.
A similar discrepancy can be seen in the second example.
Here is the value of the text in the text document for the document this CstNode was in:
Here is the value of the text in the text document for the document this CstNode was in:
We were wondering if we could be doing anything on our end which would cause something like this. Unfortunately, it is currently unclear what exactly has to be done in the table editor to get this to happen, so we don't know exactly on our end is done to get the Langium documents into this state.
Thanks for your time,
Greg
Beta Was this translation helpful? Give feedback.
All reactions