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

feat: Provide a language servers console like vscode (#838) #849

Merged
merged 1 commit into from
May 17, 2023

Conversation

angelozerr
Copy link
Contributor

@angelozerr angelozerr commented May 9, 2023

feat: Provide a language servers console like vscode (#838)

Fixes #838

To activate LSP console for a given LS, open the Language Servers settings and select message or verbose in the trace combo

image

After that when LS will be started you will see the lifecycle of the LS (starting stopping, etc)

LSPConsoleForIJ4

and the LSP traces on the right.

image

@angelozerr
Copy link
Contributor Author

It start sworking! Here a little demo with the LSP console:

LSPConsoleForIJ

Please note that my code is very ugly, so please don't review it. I have aligned the start/stop of language server with LSP4E and now I have the LSP console I have fixed a lot of bugs. For the moment I have never seen some freeze and I have less error traces.

The error kind that I see is:

  • the pipe is broken, this error comes from when the pipe is closed and there is a shutdown after, or when the IJ component throws some events (to sa ythat properties or Java files changed).
  • there is a warning when I register the toolwindow because I need to do that with Java, because the first time my ToolBarWindow is null.

I have fixed too a problem when you open, close project it will never disconnect to a messahe bus and we will have so many events which was fired.

@angelozerr angelozerr force-pushed the lsp-console branch 2 times, most recently from bd32905 to c8cf525 Compare May 16, 2023 15:30
@angelozerr angelozerr force-pushed the lsp-console branch 2 times, most recently from 571c668 to 28efe86 Compare May 17, 2023 05:04
@angelozerr angelozerr marked this pull request as ready for review May 17, 2023 06:31
@angelozerr
Copy link
Contributor Author

There is this error when I close projetc and LSP consoleis activated #862 but I thik we can live with this error for now

Copy link
Contributor

@adietish adietish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a shortcoming where the log output would only show up once I restarted the IDE.

Steps:

  1. ASSERT: have a clean build, Trace for Qute and Microprofile are off
  2. EXEC: run the IDE and turn both to verbose in the settings
  3. EXEC: open the "Language Servers" tool window
  4. ASSERT: "Tools for Microprofile" is not running, no output is shown
  5. EXEC: edit a java file and see if "Tools for Microprofile" is turned to "started" and see if there's log output

Result:
It doesnt turn to "started" and there's no log output for me. It only works as expected (steps above) once I restart the IDE.
Same is true for "Qute support" for me

Nevertheless, things work well enough to be merged and this PR especially eliminates freezes. Should be thus merged, shortcoming solved afterwards.

LGTM

@angelozerr
Copy link
Contributor Author

Thanks so much @adietish for your great review, I created your issue at redhat-developer/lsp4ij#21

@sonarcloud
Copy link

sonarcloud bot commented May 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a language servers console like vscode
3 participants