eclipse / lsp4e

Language Server Protocol support in Eclipse IDE
Eclipse Public License 2.0
65 stars 54 forks source link

Popup displayed when hovering over an error marker can not be used to obtain focus and scroll through entire diagnostic text #889

Open scottkurz opened 10 months ago

scottkurz commented 10 months ago

When I hover over an error marker in a Java editor, I get a popup that says "Press 'F2' for focus", and when pressing F2 I get a resizable version of the popup dialog, such that I can read the whole text.

I've noticed, on the other hand, that when I get an XML error, e.g. in pom.xml, (using the m2e lemminx extension) and I hover over it I get a fixed-size dialog such that I can't read the complete error text. E.g., if I type an invalid element name to trigger an XSD validation error, I can't read the full set of allowed elements, for example.

I'd paste a screenshot but I don't know how to do a screen capture without causing the popup to disappear in the meantime.

I'm just guessing this is an lsp4e issue, though I realize it's possible it is rather (or also) an issue w/ Lemminx and/or WWD XML.

The problem here is easily worked around. I can click on the marker in the column to the right-hand-side of the editor window and get a popup I can click on and resize to read the whole text. Here is the workaround (you can see I just typed an invalid <a/> element in a pom.xml:

WORKAROUND SCREENSHOT

image

To reiterate, hovering over the marker on the right-column gives the good dialog. Hovering over the marker inline within the editor source (row 13 col 2 here) gives the bad popup.

ENVIRONMENT

Besides the latest 4.30 the issue seems to exist on a couple other random recent releases I tried

eclipse.buildId=4.30.0.20231201-1200
java.fullversion=17.0.3+7
JRE 17 Windows 11 amd64-64-Bit Compressed References 20220422_155 (JIT enabled, AOT enabled)
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product

THOUGHTS

If you knew this workaround, this would be a real minor issue. But if it's an easy change to switch the popup dialog type that'd be a nice small improvement.