Skip to content

Add support for line background to sticky scrolling - #3844

Open
wahlbrink wants to merge 2 commits into
eclipse-platform:masterfrom
wahlbrink:stickyscroll-linebackground
Open

wahlbrink wants to merge 2 commits into
eclipse-platform:masterfrom
wahlbrink:stickyscroll-linebackground

Conversation

@wahlbrink

Copy link
Copy Markdown
Contributor

Some text editors, like EGit's unified diff viewer, uses line background to style the editor's text. This change adds support to specify the line background of sticky lines too, so that they can be styled like in the editor.

UnifiedDiffEditor-StickyLines

@github-actions

github-actions Bot commented Mar 31, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

0 files   -    867  0 suites   - 867   0s ⏱️ - 54m 12s
0 tests  -  8 545  0 ✅  -  8 305  0 💤  - 240  0 ❌ ±0 
0 runs   - 21 507  0 ✅  - 20 834  0 💤  - 673  0 ❌ ±0 

Results for commit e84f461. ± Comparison against base commit ad7efa0.

♻️ This comment has been updated with latest results.

@wahlbrink
wahlbrink force-pushed the stickyscroll-linebackground branch from 35bb7ad to e4489cf Compare April 1, 2026 10:50

@Christopher-Hermann Christopher-Hermann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding looks good, thanks. But I guess you need to update the version in the manifest org.eclipse.ui.editors to 3.23.0 since the interface has changed

@wahlbrink

Copy link
Copy Markdown
Contributor Author

Coding looks good, thanks. But I guess you need to update the version in the manifest org.eclipse.ui.editors to 3.23.0 since the interface has changed

In 2026-03/4.39 the version of org.eclipse.ui.editors was 3.21.0, so I think 3.22 is correct?

The APITools-check criticizes that an method was added to an interface (and wants to increment the major version -> 4.x). Does this rule also apply to added default methods?
If yes, I have to move the method to a new interface IStickyLineExtension.

@iloveeclipse

iloveeclipse commented Apr 1, 2026 •

Copy link
Copy Markdown
Member

In 2026-03/4.39 the version of org.eclipse.ui.editors was 3.21.0, so I think 3.22 is correct?

Yes.

You can add default methods in interface, no major bump is needed, but please "mute" the error in the IDE by adding API filter (and add the changed filter to the PR).

@merks

merks commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

If yes, I have to move the method to a new interface IStickyLineExtension.

It’s also permissible to create a commented filter for such an error(using a quickfix in the IDE). I’ve not looked in detail at the changes. To me that seems better, but it’s good to get a second opinion. Not sure who.

@iloveeclipse

do you have an opinion or know whom best to ask?

@merks

merks commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

I was slower on my iPhone. It looks like @iloveeclipse and I agree on a filter. Thanks for tackling this issue!

@iloveeclipse

Copy link
Copy Markdown
Member

do you have an opinion or know whom best to ask?

I believe I've answered already but you've missed my comment?

@merks

merks commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

you've missed my comment?

I think we need a synchronized block around the comment authoring method. 🤪

@vogella

vogella commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

@wahlbrink please update (rebase) so that we can get this in, would be nice if https://eclipse.gerrithub.io/c/eclipse-egit/egit/+/1237236 can use this.

@vogella vogella added the plan Planned bugs/enhancements for a release label Aug 29, 2026
@wahlbrink
wahlbrink force-pushed the stickyscroll-linebackground branch 2 times, most recently from 60bd7cf to 41e90f0 Compare August 31, 2026 14:13
@eclipse-platform-bot

Copy link
Copy Markdown
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

bundles/org.eclipse.ui.editors/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 91b21f6fdeb9173f4bf39c8e7d7517176bf25134 Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <platform-bot@eclipse.org>
Date: Mon, 31 Aug 2026 14:19:58 +0000
Subject: [PATCH] Version bump(s) for 4.42 stream


diff --git a/bundles/org.eclipse.ui.editors/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.editors/META-INF/MANIFEST.MF
index 8cdb3e3954..b55671b7dc 100644
--- a/bundles/org.eclipse.ui.editors/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.editors/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ui.editors; singleton:=true
-Bundle-Version: 3.22.100.qualifier
+Bundle-Version: 3.22.200.qualifier
 Bundle-Activator: org.eclipse.ui.internal.editors.text.EditorsPlugin
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %providerName
-- 
2.55.0

Further information are available in Common Build Issues - Missing version increments.

@wahlbrink
wahlbrink force-pushed the stickyscroll-linebackground branch 2 times, most recently from f559258 to ab4972d Compare September 3, 2026 06:38
@wahlbrink
wahlbrink force-pushed the stickyscroll-linebackground branch from ab4972d to de6a343 Compare September 13, 2026 11:00
@wahlbrink

Copy link
Copy Markdown
Contributor Author

@vogella ?

@vogella

vogella commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

@vogella ?

This seem to break the hover highlight of the sticky lines. Please add tests for that and fix.

Some text editors uses line background to style the editor's text.
This change adds support to specify the line background of sticky lines
too, so that they can be styled like in the editor.
It also improves the mouse hover effect so that the line is also
highlighted if the mouse pointer is already on it when the line is
added.
@wahlbrink
wahlbrink force-pushed the stickyscroll-linebackground branch from de6a343 to e84f461 Compare November 15, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plan Planned bugs/enhancements for a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants