Closed ptziegler closed 1 month ago
This SWT snippet uses a similar mechanism which does receive the events, making this very likely a WindowBuilder issue.
As one should, we simply suppress any and all exceptions that are thrown by the Java runtime. This NPE is thrown when calculating the bounds of the HTML document...
java.lang.NullPointerException: Cannot invoke "java.lang.Number.intValue()" because "o" is null
at org.eclipse.wb.internal.core.model.property.table.HtmlTooltipHelper.evaluateScriptInt(HtmlTooltipHelper.java:256)
at org.eclipse.wb.internal.core.model.property.table.HtmlTooltipHelper.getContentOffsetHeight(HtmlTooltipHelper.java:239)
at org.eclipse.wb.internal.core.model.property.table.HtmlTooltipHelper.expandShellToShowFullPage_Height(HtmlTooltipHelper.java:199)
at org.eclipse.wb.internal.core.model.property.table.HtmlTooltipHelper.tweakBrowserSize(HtmlTooltipHelper.java:189)
at org.eclipse.wb.internal.core.model.property.table.HtmlTooltipHelper$2.changed(HtmlTooltipHelper.java:161)
The problem is caused by this listener here, especially line 131. For whatever reason, a "location" event is fired while the browser is constructed. Because this listener disposes the whole shell, the browser is closed before it's done, leading to this weird behavior.
After the listener has been commented out, the tooltip is shown correctly again:
Hovering over a palette item is supposed to show the tooltip from within a Browser widget. This tooltip doesn't show up on Linux.
Cause seems to be that the following listener is never notified: https://github.com/eclipse-windowbuilder/windowbuilder/blob/de5b02465e1b7b00b67da3e54e5ed9b0e687ba93/org.eclipse.wb.core/src/org/eclipse/wb/internal/core/model/property/table/HtmlTooltipHelper.java#L158-L165