-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: establish language server service for the graphical editor #1315
base: main
Are you sure you want to change the base?
Conversation
Currently, this PR is still missing the necessary tests for the parser components. Testing components that are not related to ParseDocument (specifically, OpenSyncChannel, CloseSyncChannel, GetBuildings, and GetDocumentation) is currently not planned. @lars-reimann If these components require testing, please let me know. |
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
@lars-reimann |
Bug 1 Bug 2 this.logger.error(`Parsing document <${uri.path}>`);
const document = await this.LangiumDocuments.getOrCreateDocument(uri);
this.logger.error(`Document created <${document.uri.path}>`);
await this.DocumentBuilder.build([document]);
this.logger.error(`Document built <${document.uri.path}>`); I added these debug logging statements in the parseDocument function in the language server, then opened first the complex-titanic.sds file in the editor, then closed the graphical editor, and the opened .sds document, then opened the simple-titanic.sds file in the text editor, and then the graphical editor. These log statements were produced after opening the simple-titanic.sds file:
So it seems that this line: const document = await this.LangiumDocuments.getOrCreateDocument(uri); produces the old document, when using the new uri. |
Related to #1243.
Summary of Changes
Adds a language server service that provides the necessary components for the graphical editor.