Skip to content

Simple implementation of LSP protocol shutdown request and exit notification handlers - #8770

Merged
lahodaj merged 1 commit into
apache:masterfrom
shivam71:lsp_exit_shutdown_impl
Sep 8, 2025
Merged

lahodaj merged 1 commit into
apache:masterfrom
shivam71:lsp_exit_shutdown_impl

Conversation

@shivam71

Copy link
Copy Markdown
Contributor

Changes related to Netbeans Java Language Server

Context

  • LSP Protocol provides the language clients to send messages to the language server to shutdown and exit .
  • This allows language clients to control the lifecycle of the language server completely from start to shutdown. Spec relevant section : lifeCycleMessages

About the changes made

  • Shutdown Request handler and the Exit Notification handler implemented

Note
As per the LSP Spec about Shutdown Request the language server should respond with Invalid Request error post receiving the shutdown request . That can be done in the future if required but has been deferred for now to keep this change simple .

@lahodaj lahodaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks reasonable to me. I was thinking if using something like AtomicBoolean would be safer, but I think the dispatch is done in one thread only, so plain boolean is probably OK.

@lahodaj lahodaj added the LSP [ci] enable Language Server Protocol tests label Sep 1, 2025
@lahodaj lahodaj added this to the NB28 milestone Sep 1, 2025
@apache apache locked and limited conversation to collaborators Sep 1, 2025
@apache apache unlocked this conversation Sep 1, 2025
@matthiasblaesing

Copy link
Copy Markdown
Contributor

@lahodaj @shivam71 is not a committer, if you still think that this is good to go, please merge.

@lahodaj
lahodaj merged commit 2c92300 into apache:master Sep 8, 2025
59 of 60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LSP [ci] enable Language Server Protocol tests VSCode Extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants