Community
Participate
Working Groups
When a DoubleClickListener is added to a TableViewer with several columns, DoubleClickEvents are only fired when the user double-clicks on the first column in the table on Windows. Double clicking on any other column seems to have no effect. On macOS and Linux, all columns trigger DoubleClickEvents. A simple way to reproduce this problem is to open the Language Servers -> Logs preference page of lsp4e. It allows users to selectively enable file or console logging on a per language server basis, by double clicking on the different items in the table. This preference page does not work on Windows. The relevant code creating the TableViewer is here: https://git.eclipse.org/c/lsp4e/lsp4e.git/tree/org.eclipse.lsp4e/src/org/eclipse/lsp4e/ui/LoggingPreferencePage.java I had a dig around, but wasn't able to successfully track down the root cause of this issue. The details I've provided will hopefully be helpful.
@Mickael, added you to CC list so that you're aware this is causing issues with lsp4e on Windows.
Thanks Pierre-Yves, I wasn't aware of this. On LSP4E side, we could rework a bit the list to use a CheckboxCellEditor instead of double-clicking. This might be more consistent with other parts or UI and hopefully make things usable on Windows by avoiding that bug.
Hmmm... I've been playing around with TableViewer objects, and apparently creating them with SWT.FULL_SELECTION seems to solve the problem on Windows (new TableViewer(composite, SWT.FULL_SELECTION)). Any ideas why this flag is required for this operating system?
(In reply to Pierre-Yves B. from comment #3) > Hmmm... I've been playing around with TableViewer objects, and apparently > creating them with SWT.FULL_SELECTION seems to solve the problem on Windows > (new TableViewer(composite, SWT.FULL_SELECTION)). Any ideas why this flag is > required for this operating system? This seem to be intentional Windows behaviour. Recognized the same when I made my fake control example in bug 550555 comment 5. The relevant code is in SWT Table#sendMouseDownEvent where the hit test only check for the first column if not in FULL_SELECTION mode.
Quite a few other bugs seem to mention similar behaviours, for instance Bug 396604. If it really is intentional behaviour, maybe it's worth updating some of the Javadocs to avoid users being caught off-guard in the future?