Skip to content

langiumLangiumDocuments.getOrCreateDocument return all properties except one properties #1271

Answered by msujew
zrwsmd asked this question in Q&A
Discussion options

You must be logged in to vote

In the second screenshot you've posted, the parse result clearly contains a parser error.

As for the requirement you're talking about: You could always create a synthetic diagramRoot element and put it into the state object. But I don't really see why this is necessary in the first place. If this is effectively modelling a graph wouldn't the added new node immediately become the root node in the case of an empty file? Why the need for a separate root node?

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@msujew
Comment options

Answer selected by zrwsmd
@zrwsmd
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants