Skip to content

Conversation

@dbalek
Copy link
Contributor

@dbalek dbalek commented Sep 23, 2025

Computing Javadoc for completion items in language server, try to assign class sources automatically if they are missing.

@dbalek dbalek added this to the NB28 milestone Sep 23, 2025
@dbalek dbalek self-assigned this Sep 23, 2025
@dbalek dbalek added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) LSP [ci] enable Language Server Protocol tests labels Sep 23, 2025
if (root != null) {
CompletableFuture<String> future = new CompletableFuture<>();
try {
SourceJavadocAttacher.attachSources(root.toURL(), new SourceJavadocAttacher.AttachmentListener() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmmm, just to check - do the attachers run asynchronously? I was trying to look at the sources, and it appears there may be a lot of work happening synchronously, but I am not sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The whole computation is performed asynchronously in the TextDocumentServiceImpl.WORKER thread.

Copy link

@donphelix donphelix left a comment

Choose a reason for hiding this comment

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

Code Readability

@dbalek dbalek force-pushed the dbalek/attach-sources-for-cc-javadoc branch from 6545e52 to 0a6eac2 Compare September 29, 2025 10:22
Copy link

@donphelix donphelix left a comment

Choose a reason for hiding this comment

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

It's now better from my side

@MartinBalin
Copy link
Contributor

I believe this can be now merged?

Copy link
Contributor

@lahodaj lahodaj left a comment

Choose a reason for hiding this comment

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

Looks good to me - thanks!

@MartinBalin MartinBalin merged commit 6a449d0 into apache:master Oct 8, 2025
103 of 105 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

4 participants