Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public void setInput(@Nullable Object input) {
if (input instanceof AsyncHtmlHoverInput async) {
this.currentAsyncToken = async.token;
super.setInput(styleHtml(async.placeholderHtml));
async.future.whenComplete((html, ex) -> UI.getDisplay().asyncExec(() -> {
async.future.whenComplete((html, ex) -> UI.runOnUIThread(() -> {
if (getShell() == null || getShell().isDisposed()) {
return;
}
Expand All @@ -172,14 +172,15 @@ public void setInput(@Nullable Object input) {
}
if (ex != null) {
LanguageServerPlugin.logError(ex);
dispose();
super.setInput(
"Unexpected error: " + ex.getClass().getSimpleName() + ": " + ex.getLocalizedMessage()); //$NON-NLS-1$ //$NON-NLS-2$
return;
}
if (html != null && !html.isBlank()) {
super.setInput(styleHtml(html));
} else {
// No content from LS; hide placeholder
dispose();
super.setInput(""); //$NON-NLS-1$
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.

I think I understand this one and I also think it is the best thing to do. My understanding is: the text "Loading..." will be replaced with the empty string, and the content will be available until the user dismisses it. Correct?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Correct

}
}));
return;
Expand Down