feat: establish language server service for the graphical editor#1315
feat: establish language server service for the graphical editor#1315GideonKoenig wants to merge 10 commits intomainfrom
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 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1315 +/- ##
==========================================
- Coverage 99.73% 97.99% -1.74%
==========================================
Files 120 135 +15
Lines 13031 13853 +822
Branches 4266 4438 +172
==========================================
+ Hits 12996 13575 +579
- Misses 35 277 +242
- Partials 0 1 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Edit: Has been resolved. @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. Edit: This has been resolved. |
|
@lars-reimann I have added test coverage for the most important code paths. |
|
No, this should be alright now. It will still be a while until I merge your PRs, but that need not bother you. |

Related to #1243.
Summary of Changes
Adds a language server service that provides the necessary components for the graphical editor.