File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/hover Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ public void setInput(@Nullable Object input) {
162162 if (input instanceof AsyncHtmlHoverInput async ) {
163163 this .currentAsyncToken = async .token ;
164164 super .setInput (styleHtml (async .placeholderHtml ));
165- async .future .whenComplete ((html , ex ) -> UI .getDisplay (). asyncExec (() -> {
165+ async .future .whenComplete ((html , ex ) -> UI .runOnUIThread (() -> {
166166 if (getShell () == null || getShell ().isDisposed ()) {
167167 return ;
168168 }
@@ -172,14 +172,15 @@ public void setInput(@Nullable Object input) {
172172 }
173173 if (ex != null ) {
174174 LanguageServerPlugin .logError (ex );
175- dispose ();
175+ super .setInput (
176+ "Unexpected error: " + ex .getClass ().getSimpleName () + ": " + ex .getLocalizedMessage ()); //$NON-NLS-1$ //$NON-NLS-2$
176177 return ;
177178 }
178179 if (html != null && !html .isBlank ()) {
179180 super .setInput (styleHtml (html ));
180181 } else {
181182 // No content from LS; hide placeholder
182- dispose ();
183+ super . setInput ( "" ); //$NON-NLS-1$
183184 }
184185 }));
185186 return ;
You can’t perform that action at this time.
0 commit comments