Community
Participate
Working Groups
Since updating to Eclipse 4.14 (and EGit 5.6.0) the Git Repositories view appears to have a new behavior in Linux (GTK), which can be somewhat annoying: When selecting an item in the Git Repositories tree view, the view automatically scrolls vertically so that the item is centered in the view. This makes it difficult to get double-click to work reliably. I couldn't find a preference to disable this feature.
Indeed it does, but apparently only on GTK/Eclipse 4.14. Doesn't do so on Mac, and doesn't do so in GTK/Eclipse 4.13. CentOS 7, org.eclipse.swt.internal.deviceZoom=100 org.eclipse.swt.internal.gdk.backend=x11 org.eclipse.swt.internal.gtk.theme=Adwaita org.eclipse.swt.internal.gtk.version=3.22.30
Note: I have not yet encountered any other tree widget in Eclipse 4.14 which exposes this behavior.
Perhaps a side-effect of the inline renaming of Repository Groups. The JFace inline editing support tracks the current focus cell, and calls ViewerCell.scrollIntoView(), which ends up calling Tree.showItem(). The javadoc says "If the item is already showing in the receiver, this method simply returns. Otherwise, the items are scrolled and expanded until the item is visible." But since https://git.eclipse.org/r/#/c/151275/ that scrolls on GTK even if the item is visible!
It works for me on Windows 10, but I have a pretty old EGit version installed. (In reply to Knut Wannheden from comment #2) > Note: I have not yet encountered any other tree widget in Eclipse 4.14 which > exposes this behavior. Did you try in the Project Explorer? If it only happens in the Git Repositories view, then it might be an EGit issue.
(In reply to Dani Megert from comment #4) > Did you try in the Project Explorer? If it only happens in the Git > Repositories view, then it might be an EGit issue. If you look at https://git.eclipse.org/r/#/c/151275/ it's quite obvious that this is a regression in the GTK version of SWT. You can see the same behavior (on GTK) in the tracing preferences page. Using an Eclipse for Committers, 2029-12, for Linux: 1. Open the tracing preferences page 2. Enable tracing 3. Make the dialog large enough to show some 20 lines 3. Expand the "Platform Debug UI" node 4. Scroll to such that the node is on the top line (or just scroll to the bottom) 5. Click on the first child ("org.eclipse.debug.ui/debug") Result: the viewer scrolls the selected node to the middle of the tree.
New Gerrit change created: https://git.eclipse.org/r/154943
(In reply to Eclipse Genie from comment #6) > New Gerrit change created: https://git.eclipse.org/r/154943 @Knut: I've put in a work-around in EGit that avoids triggering this SWT regression. Temporary update site at https://ci.eclipse.org/egit/job/egit.gerrit/1065/artifact/org.eclipse.egit.repository/target/repository/ , please test. The underlying SWT problem of course still exists.
Gerrit change https://git.eclipse.org/r/154943 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=9072fa39911083d1507f44c1380dba66f0b5fbae
New Gerrit change created: https://git.eclipse.org/r/155016
Gerrit change https://git.eclipse.org/r/155016 was merged to [stable-5.6]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=b7c9cd5be3ceac2aad7908334e1fc7c328a34eb4
New Gerrit change created: https://git.eclipse.org/r/160525
(In reply to Eclipse Genie from comment #11) > New Gerrit change created: https://git.eclipse.org/r/160525 I do feel the above will fix underlying SWT problem. The earlier code was to scroll to the center of the window. Now with the above patch we do a minimum scroll to make tree item visible. Still some more testing is required. So I am moving this to M3
Gerrit change https://git.eclipse.org/r/160525 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=afbe225fce16da1155c27098e8554a85fe59c15d
(In reply to Eclipse Genie from comment #13) > Gerrit change https://git.eclipse.org/r/160525 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=afbe225fce16da1155c27098e8554a85fe59c15d Merged to master
Verified in Eclipse SDK Version: 2020-06 (4.16) Build id: I20200407-1800 OS: Linux, v.4.15.0-96-generic, x86_64 / gtk 3.22.30 Java version: 1.8.0_242