Skip to content

Webgui-new language service#759

Merged
mcserep merged 1 commit intoEricsson:masterfrom
barnabasdomozi:langservice
Oct 9, 2024
Merged

Webgui-new language service#759
mcserep merged 1 commit intoEricsson:masterfrom
barnabasdomozi:langservice

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.

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