Skip to content

Conversation

barnabasdomozi
Copy link
Collaborator

The current implementation of webgui-new only calls the CppService as a Language Service.
This is an issue when requesting information such as getAstNodeInfoByPosition since the CppService gets called even if we are not viewing C++ files.

In this patch, I added a universal language-service for webgui-new, which decides the service to call based on file type.
Before using this language-service, one should call createClient with a file type and then it creates the appropriate Thrift connection.

I also replaced existing CppService calls with the new language-service.

For the codemirror-editor, I also added a languageExtension function, which selects the correct CodeMirror extension for syntax highlight.

@mcserep mcserep self-requested a review August 30, 2024 10:51
@mcserep mcserep added Kind: Refactor 🔃 Target: WebGUI Issues related to the web frontend. labels Aug 30, 2024
@mcserep mcserep added this to the Upcoming Release milestone Aug 30, 2024
@mcserep
Copy link
Collaborator

mcserep commented Aug 30, 2024

Thanks for refactoring this part. The code looks good, needs functional testing before getting merged.

@mcserep mcserep merged commit 4d025e2 into Ericsson:master Oct 9, 2024
13 of 14 checks passed
@barnabasdomozi barnabasdomozi deleted the langservice branch November 23, 2024 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Kind: Refactor 🔃 Target: WebGUI Issues related to the web frontend.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants