eclipse-platform / eclipse.platform.swt

Eclipse SWT
https://www.eclipse.org/swt/
Eclipse Public License 2.0
118 stars 137 forks source link

Table cells are not showing tooltips #509

Open davu-all opened 1 year ago

davu-all commented 1 year ago

Describe the bug Hovering with mouse on a table's row cell a tooltip of the content is not displayed.

To Reproduce Hover with your mouse on a Table within a TableViewer. No tooltip is displayed.

Expected behavior The tooltip is displayed.

Environment:

  1. Select the platform(s) on which the behavior is seen:

      • [] All OS
      • [x] Windows
      • [ ] Linux
      • [ ] macOS
  2. Additional OS info (e.g. OS version, Linux Desktop, etc)

  3. JRE/JDK version jdk 11.0.14.101

Version since Eclipse or SWT version since when the behavior is seen: bug showed up in 4.21. (It was working in 4.15 - no info for the version in between).

Workaround (or) Additional context I tried replacing in my system the org.eclipse.swt_3.119.0 and org.eclipse.swt.win32.win32.x86_64_3.119.0 from 4.21 with the 3.114.0 from 4.15 and the tooltip worked again.

iloveeclipse commented 1 year ago

1) Which exact Windows version is used? 2) Please provide a simple standalone SWT snippet demonstrating the problem.

davu-all commented 1 year ago

Hi @iloveeclipse, Those are my OS information: Edition Windows 10 Enterprise Version 21H2 OS build 19044.2364 Windows Feature Experience Pack 120.2212.4190.0

For the snippet i will try to provide one as soon as i can (most likely after the holidays)

Phillipus commented 1 year ago

Don't forget to call ColumnViewerToolTipSupport.enableFor(viewer); if you are using a TableViewer.

davu-all commented 1 year ago

Hi @Phillipus, it did not help.

deepika-u commented 1 year ago

@davu-all Are you still facing this issue? If yes can you please share a snippet to reproduce the issue.

davu-all commented 1 year ago

@deepika-u yes the problem is still there. I need to find the time to create a snippet from scratch.

davu-all commented 1 year ago

@deepika-u you can use https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet011CustomTooltips.java I tried and in no way the tooltip are showing up.

HTH!

Phillipus commented 1 year ago

@deepika-u you can use https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.ui/master/examples/org.eclipse.jface.snippets/Eclipse%20JFace%20Snippets/org/eclipse/jface/snippets/viewers/Snippet011CustomTooltips.java I tried and in no way the tooltip are showing up.

HTH!

I tried that Snippet on Windows 10 and 11 with SWT 3.123.0.v20230220-1431 (Eclipse 4.27) and the tooltips are displayed OK.

deepika-u commented 1 year ago

Hi @davu-all,

As Phillipus already conveyed, I am also able to see the tooltips like below ::

image

As per the snippet there is an expected delay of 2secs to show the tooltip. So it is working as expected.

I have tried on below environment Eclipse SDK Version: 2023-09 (4.29) Build id: I20230705-1800 OS: Windows 11, v.10.0, x86_64 / win32 Java vendor: Eclipse Adoptium Java runtime version: 20+36 Java version: 20

Can you please confirm on the same.

JohnRandomdude commented 1 year ago

It does work fine with swt tooltip (the yellow one) Yet windows native tooltip (useNativeTooltip in label provider returns true) doesn't work since this commit Downgrading org.eclipse.swt.win32.win32.x86_64 to 3.115.100 seems to "solve" the issue, and there's no native tooltip since 3.116.0

Java 17, Windows 10 Pro N 22H2 (OS build 19045.3208)

Phillipus commented 1 year ago

Yet windows native tooltip (useNativeTooltip in label provider returns true) doesn't work since this commit Downgrading org.eclipse.swt.win32.win32.x86_64 to 3.115.100 seems to "solve" the issue, and there's no native tooltip since 3.116.0

I just tested useNativeTooltip returning true on a sub-class of org.eclipse.jface.viewers.CellLabelProvider and it's working fine.

Windows 11 SWT 3.124.0

Edit - this is working in TreeViewer but not TableViewer

Phillipus commented 1 year ago

I just tested useNativeTooltip returning true on a sub-class of org.eclipse.jface.viewers.CellLabelProvider and it's working fine.

Actually, it is working with TreeViewer but not TableViewer. @JohnRandomdude might be worth opening a new issue for that.

deepika-u commented 1 year ago

Can we close this issue since #752 is anyways open?