Tooltip not visible on windows
Closed this issue · 4 comments
Describe the bug
In recent versions of GAMA the tooltip is not visible anymore:
To Reproduce
Steps to reproduce the behavior:
- Open gama 1.9.2
- hover over a keyword
- Observe that you can't read the tooltip
Expected behavior
It is visible as it was previously the case
Desktop (please complete the following information):
- OS: Windows 11
- GAMA version: 1.9.2 compiled and from eclipse
Additional context
It works properly with my 1.8.2-rc2, 1.9.1 and even 1.9.2 from june first. I tried to reinstall in a different directory/change workspace but can't see any change
In development mode I got this error in the eclipse console, but don't know if it's related or not:
11587 [main] WARN org.eclipse.xtext.ui.editor.hover.html.XtextElementLinks - Could not handle locationdata:text/html;charset=utf-8;base64,PGh0bWw+PGhlYWQ+PHN0eWxlIENIQVJTRVQ9IklTTy04ODU5LTEiIFRZUEU9InRleHQvY3NzIj4vKiBGb250IGRlZmluaXRpb25zICovCmh0bWwgICAgICAgICB7IGZvbnQtZmFtaWx5OiAnU2Vnb2UgVUknLHNhbnMtc2VyaWY7IGZvbnQtc2l6ZTogMTJwdDsgZm9udC1zdHlsZTogbm9ybWFsOyBmb250LXdlaWdodDogbm9ybWFsOyB9CmJvZHksIGgxLCBoMiwgaDMsIGg0LCBoNSwgaDYsIHAsIHRhYmxlLCB0ZCwgY2FwdGlvbiwgdGgsIHVsLCBvbCwgZGwsIGxpLCBkZCwgZHQgeyBmb250LXNpemU6IDFlbTsgfQpwcmUgICAgICAgICAgeyBmb250LWZhbWlseTogbW9ub3NwYWNlOyB9CgovKiBNYXJnaW5zICovCmJvZHkJICAgICB7IG92ZXJmbG93OiBhdXRvOyBtYXJnaW4tdG9wOiAwcHg7IG1hcmdpbi1ib3R0b206IDAuNWVtOyBtYXJnaW4tbGVmdDogMC4zZW07IG1hcmdpbi1yaWdodDogMHB4OyB9CmgxICAgICAgICAgICB7IG1hcmdpbi10b3A6IDAuM2VtOyBtYXJnaW4tYm90dG9tOiAwLjA0ZW07IH0JCmgyICAgICAgICAgICB7IG1hcmdpbi10b3A6IDJlbTsgbWFyZ2lu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PC91bD48YnIvPjxoci8+PGI+RGF0YXR5cGUgcmdiPC9iPjxici8+RGF0YXR5cGUgcmdiLCB3cmFwcyBKYXZhIG9iamVjdHMgb2YgY2xhc3MgR2FtYUNvbG9yPGJyLz5UaGUgdHlwZSByZ2IgcmVwcmVzZW50cyBjb2xvcnMgaW4gR0FNTCwgd2l0aCB0aGVpciB0aHJlZSByZWQsIGdyZWVuLCBibHVlIGNvbXBvbmVudHMgYW5kLCBvcHRpb25hbGx5LCBhIGZvdXJ0aCBhbHBoYSBjb21wb25lbnQgPC91bD48aHIvPkFjY2Vzc2libGUgZmllbGRzOiA8YnIvPjx1bD48bGk+PGI+ZGFya2VyPC9iPjogUmV0dXJucyBhIGRhcmtlciBjb2xvciAod2l0aCBkZWNyZWFzZWQgbHVtaW5hbmNlKTxsaT48Yj5ncmVlbjwvYj46IFJldHVybnMgdGhlIGdyZWVuIGNvbXBvbmVudCBvZiB0aGUgY29sb3IgKGJldHdlZW4gMCBhbmQgMjU1KTxsaT48Yj5yZWQ8L2I+OiBSZXR1cm5zIHRoZSByZWQgY29tcG9uZW50IG9mIHRoZSBjb2xvciAoYmV0d2VlbiAwIGFuZCAyNTUpPGxpPjxiPmFscGhhPC9iPjogUmV0dXJucyB0aGUgYWxwaGEgY29tcG9uZW50ICh0cmFuc3BhcmVuY3kpIG9mIHRoZSBjb2xvciAoYmV0d2VlbiAwIGZvciB0cmFuc3BhcmVudCBhbmQgMjU1IGZvciBvcGFxdWUpPGxpPjxiPmJsdWU8L2I+OiBSZXR1cm5zIHRoZSBibHVlIGNvbXBvbmVudCBvZiB0aGUgY29sb3IgKGJldHdlZW4gMCBhbmQgMjU1KTxsaT48Yj5icmlnaHRlcjwvYj46IFJldHVybnMgYSBsaWdodGVyIGNvbG9yICh3aXRoIGluY3JlYXNlZCBsdW1pbmFuY2UpPC91bD48YnIvPjwvcD48L2JvZHk+PC9odG1sPg==
java.net.MalformedURLException: unknown protocol: data
at java.base/java.net.URL.<init>(URL.java:681)
at java.base/java.net.URL.<init>(URL.java:569)
at java.base/java.net.URL.<init>(URL.java:516)
at org.eclipse.xtext.ui.editor.hover.html.XtextElementLinks$XtextLinkAdapter.changing(XtextElementLinks.java:165)
at org.eclipse.swt.browser.Edge.handleNavigationStarting(Edge.java:575)
at org.eclipse.swt.browser.Edge.handleNavigationStarting(Edge.java:557)
at org.eclipse.swt.browser.Edge.lambda$5(Edge.java:197)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3640)
at org.eclipse.jface.internal.text.html.BrowserInformationControl.setVisible(BrowserInformationControl.java:353)
at org.eclipse.jface.text.AbstractInformationControlManager.showInformationControl(AbstractInformationControlManager.java:1240)
at org.eclipse.jface.text.TextViewerHoverManager.showInformationControl(TextViewerHoverManager.java:276)
at org.eclipse.jface.text.AbstractInformationControlManager.internalShowInformationControl(AbstractInformationControlManager.java:1191)
at org.eclipse.jface.text.AbstractInformationControlManager.presentInformation(AbstractInformationControlManager.java:1120)
at org.eclipse.jface.text.AbstractHoverInformationControlManager.presentInformation(AbstractHoverInformationControlManager.java:884)
at org.eclipse.jface.text.TextViewerHoverManager.doPresentInformation(TextViewerHoverManager.java:237)
at org.eclipse.jface.text.TextViewerHoverManager.lambda$3(TextViewerHoverManager.java:227)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4029)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3645)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:643)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:550)
at msi.gama.application.Application.start(Application.java:148)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
at org.eclipse.equinox.launcher.Main.main(Main.java:1440)
12838 [main] WARN org.eclipse.xtext.ui.editor.hover.html.XtextElementLinks - Could not handle locationdata:text/html;charset=utf-8;base64,PGh0bWw+PGJvZHkgc3R5bGU9Im92ZXJmbG93OmhpZGRlbjsiID48L2h0bWw+
java.net.MalformedURLException: unknown protocol: data
at java.base/java.net.URL.<init>(URL.java:681)
at java.base/java.net.URL.<init>(URL.java:569)
at java.base/java.net.URL.<init>(URL.java:516)
at org.eclipse.xtext.ui.editor.hover.html.XtextElementLinks$XtextLinkAdapter.changing(XtextElementLinks.java:165)
at org.eclipse.swt.browser.Edge.handleNavigationStarting(Edge.java:575)
at org.eclipse.swt.browser.Edge.handleNavigationStarting(Edge.java:557)
at org.eclipse.swt.browser.Edge.lambda$5(Edge.java:197)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3640)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:643)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:550)
at msi.gama.application.Application.start(Application.java:148)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
at org.eclipse.equinox.launcher.Main.main(Main.java:1440)
I managed to track down the problem, it seems like the tooltips depend on the web browser defined.
Since 1.9.1 we changed the one by default to edge in windows to solve the issue #3804, and it looks like the "location" of the event built by the Edge engine ("data:text/html;charset=utf-8;base64,[...]") is different from the previous one (which was "about:blank") and can't be interpreted as a url.
As we don't have any control on all that stack of calls (happening in swt) I have no idea how to solve this apart from reverting to the previous browser, but that would reopen the issue #3804
@RoiArthurB, @AlexisDrogoul , what do you think ?
I think we can probably manage to have some kind of control by (re)defining some of the classes used in the stack through injection (via XText). But we need to know which one...
@lesquoyb Did you try to see if the new tab input is working with edge on Windows ? Maybe the issue is some issue/lacking support with the chromium web engine ?
Also, it's surprising me that it was working with "about:blank" (which is a code for opening a new tab, not supposed to fill any content inside)...
@RoiArthurB I'm not sure what you are asking for exactly, the web navigation is working properly inside gama though I can't open any new tab, my only option is to open links either in the main tab ("welcome.html") or to open in a new window (which works properly)
I think that about:blank makes a lot of sense in the context of creating a widget, on the opposite, data:text... is more like the metadata.
@AlexisDrogoul following the call stack: the problem lies in the creation of the event object in the Edge
class (org.eclipse.swt.Edge
) in the handleNavigationStarting
method where an event object is created and its (wrong) location is set, then the changing method of a listener (of type XtextLinkAdapter
in org.eclipse.xtext.ui.editor.hover.html.XtextElementLinks.java
) is called with that new event as the new value, this is where the bug appear as the "location" is not recognized as a URL.
I found someone reporting a similar issue here, and following the links I ended up on that pull request that seems to fix it. I don't know how we can adapt it to our code though