-
Notifications
You must be signed in to change notification settings - Fork 915
LSP: Attach missing sources when computing completion docs. #8858
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
LSP: Attach missing sources when computing completion docs. #8858
Conversation
| if (root != null) { | ||
| CompletableFuture<String> future = new CompletableFuture<>(); | ||
| try { | ||
| SourceJavadocAttacher.attachSources(root.toURL(), new SourceJavadocAttacher.AttachmentListener() { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
donphelix
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Readability
java/java.editor/src/org/netbeans/modules/editor/java/JavaCompletionCollector.java
Show resolved
Hide resolved
6545e52 to
0a6eac2
Compare
donphelix
left a comment
There was a problem hiding this 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
|
I believe this can be now merged? |
lahodaj
left a comment
There was a problem hiding this 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!
Computing Javadoc for completion items in language server, try to assign class sources automatically if they are missing.