Skip to content
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

Webgui-new language service #759

Merged
merged 1 commit into from
Oct 9, 2024
Merged

Webgui-new language service #759

merged 1 commit into from
Oct 9, 2024

Conversation

wbqpk3
Copy link
Collaborator

@wbqpk3 wbqpk3 commented Aug 26, 2024

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
@wbqpk3 wbqpk3 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