Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I thought I'd start a new discussion that focuses on ids. I'm working with a Node server and VS Code extension and implementing work based off the task-list and workflow examples.
The issue at hand is that modifications to element nodes, like dragging and dropping or editing of names, is not working. You can drag a node or type a new name, but when you release to drop or click away the node reverts back to its original state.
I believe this is an issue with id's.
I noticed that on each element change, the index generates new id's for each element. See below screenshot. The first set of id's is what's initially generated. The second set comes after a change (a drop and drop) occurs.
I think this is where the issue lies because the ChangeOperationHandler is sending back one id, while the server produces a new one. Correct me if I'm wrong - I understand when a change occurs, the action is sent from the client and received by the server through the handler operation(?), where it identifies the element to modify based off the id. It then should update the source model with the modifications, and regenerate the GModel. However, whenever it regenerates the GModel, it calls the builder function in our source model and it regenerates a brand new id. How is it suppose to not create a new id every time the server runs the GModel? That is what I am most confused about. Shouldn't the GModel checks for the existing id, before building, so that it doesn't create new elements? Where does that take place?
Another possibility I found is that in our NodeBuilder class (following the workflow example here) it calls
this.proxy.id
. This traces back to one of the files behind the scenes GLSP uses and I believe this is where it generates a new id every time its called:Could you confirm what the above function does?
Thank you so much for all the time and help you've given. It is really appreciated.
Beta Was this translation helpful? Give feedback.
All reactions