Skip to content

Not registering the LSP's SingleFileOptionsQueryImpl in java.lsp.server, but only in nbcode#6854

Merged
lahodaj merged 1 commit intoapache:masterfrom
lahodaj:fix-single-file-options-in-nb
Jan 5, 2024
Merged

Not registering the LSP's SingleFileOptionsQueryImpl in java.lsp.server, but only in nbcode#6854
lahodaj merged 1 commit intoapache:masterfrom
lahodaj:fix-single-file-options-in-nb

Conversation

@lahodaj
Copy link
Contributor

@lahodaj lahodaj commented Dec 15, 2023

As noted here:
#6329 (comment)
the compiler options set a VM Options for a source-file launcher are not working in the NetBeans GUI. The reason is that the provider from java.lsp.server overrides the default provider.

This patch moves the registration into nbcode, which, I believe, is what has been done in similar cases.

Also, in TextDocumentServiceImpl.resolveCodeAction, the data may be null, I believe (like for the "Enable Preview" action), adding a null check.

@lahodaj lahodaj requested review from dbalek and sdedic December 15, 2023 17:48
@lahodaj lahodaj added the LSP [ci] enable Language Server Protocol tests label Dec 15, 2023
@lahodaj lahodaj added this to the NB21 milestone Dec 15, 2023
@mbien mbien added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Dec 16, 2023
@apache apache locked and limited conversation to collaborators Dec 16, 2023
@apache apache unlocked this conversation Dec 16, 2023
@mbien
Copy link
Member

mbien commented Dec 16, 2023

thanks a lot for fixing this. I tested the dev build and can confirm that --enable-preview has its desired effect again in single-file-programs and that the errors disappear. (just like in NB 20)

@lahodaj lahodaj merged commit e92309c into apache:master Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) LSP [ci] enable Language Server Protocol tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants