Open WolfgangHG opened 1 month ago
I know from experience that getting the hover to be a nice size is a challenge at best. The framework just doesn't do such a great job supporting this. It depends on calls to org.eclipse.jface.text.AbstractInformationControl.setSizeConstraints(int, int)
which gets info from org.eclipse.jface.internal.text.InformationControlReplacer.computeBoundsFromContent(IInformationControl, Rectangle)
where things heavily depend on how the HTML is converted to text for which the size can be properly computed. Unfortunately I doubt anyone is going to fix this generic problem without the involvement of the framework that is producing this information.
It is possible to product larger results by investing more effort on the production side of things as we do for the hovers in Oomph setup editor:
Indeed, the issue is most likely caused by setSizeConstraints
not receiving the right value. For this particular case in the description, the popup is a Composite of the usual error hover popup and a web browser showing the description (see CompositeInformationControl and CompositeInformationControlCreator).
For the tests in org.eclipse.ui.genericeditor.tests, it should be possible to debug whether 2 "compound" hover do receive the right setSizeConstraint or similar. But IIRC (I'm not sure), the issue doesn't happen with "static" hover content, but happens very easily if the 2nd hover element is a Browser (like it's the case in the initial description).
Anyway, there is nothing easy to do here, except running a debugger on the CompositeInformationControl and family.
Unfortunately I doubt anyone is going to fix this generic problem without the involvement of the framework that is producing this information.
and
Anyway, there is nothing easy to do here, except running a debugger on the CompositeInformationControl and family.
I cannot help with debugging, being no Eclipse developer ;-).
Your comment sounds like the project which creates the message would have to handle this? So a new issue somewhere else?
I created a maven project from the archetype "org.wildfly.archetype:wildfly-jakartaee-webapp-archetype:35.0.1.Final", then I added three dependencies to pom.xml:
One dependency has a unnecessary "version" element. So a warning "Overriding managed version 3.0.2 for jakarta.servlet.jsp.jstl-api" is reported. The popuop when hovering over the warning text has a wrong size.
When hovering over "version", the message is completely visible, but when resizing the popup, additional info about the "version" element becomes visible. Is this intended?
When hovering over the text content of "version", the message is clipped. A second warning is shown when resizing it:
Hope this the right place to report it. Some time ago I reported a similar "popup is too small" problem for the xml editor (https://www.github.com/eclipse-lsp4e/lsp4e/issues/214) and was told to report it here. But as I could not reproduce the issue, I did not do this ;-). Anyway, in the other issue it was suggested that it might be related to multiple warnings in one place, and the second warning could be such a case, as there are two messages.