Skip to content

Show mouse move control even when not showing single line#2583

Merged
merks merged 1 commit intoeclipse-platform:masterfrom
merks:pr-improve-merge-viewer
Mar 21, 2026
Merged

Show mouse move control even when not showing single line#2583
merks merged 1 commit intoeclipse-platform:masterfrom
merks:pr-improve-merge-viewer

Conversation

@merks
Copy link
Contributor

@merks merks commented Mar 21, 2026

With this simple change, the controls to do the merging still appear when you hover over the area that's connecting the changes on the two sides:

image

@HannesWell @akurtakov

I think this addresses your concerns about lost of functionality.

@iloveeclipse

Given there is no visual appearance until you hover, I assume this is not a controversial addition.

@github-actions
Copy link
Contributor

Test Results

    54 files  ±0      54 suites  ±0   35m 48s ⏱️ -56s
 4 546 tests ±0   4 522 ✅  - 1   23 💤 ±0  1 ❌ +1 
12 234 runs  ±0  12 074 ✅  - 1  159 💤 ±0  1 ❌ +1 

For more details on these failures, see this check.

Results for commit 0e395ed. ± Comparison against base commit 8f967b6.

Copy link
Member

@HannesWell HannesWell left a comment

Choose a reason for hiding this comment

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

That's much better and looks good.
Thank you!

I tried this out and it mostly works well.

It's just that on long ranges the move buttons are hard to find without a marker.
On the other hand, showing a marker for short ranges looks like it clutters the diff.
Maybe the button marks (the small squares) can be shown only if a change exceeds a certain length.
However, this can also be done in a follow-up.

@merks
Copy link
Contributor Author

merks commented Mar 21, 2026

The windows tests passed when I restarted it, so the summary is incorrect, i.e., not updated.

image

@merks merks merged commit 2222ff6 into eclipse-platform:master Mar 21, 2026
20 of 22 checks passed
@merks merks deleted the pr-improve-merge-viewer branch March 21, 2026 13:23
@merks
Copy link
Contributor Author

merks commented Mar 21, 2026

FYI, I also experiment with commenting out the fUseSingleLine guard here:

if (fUseSingleLine && isAnySideEditable()) {
// draw resolve state
int cx= (w-RESOLVE_SIZE)/2;
int cy= ((ly+lh/2) + (ry+rh/2) - RESOLVE_SIZE)/2;
g.setBackground(fillColor);
g.fillRectangle(cx, cy, RESOLVE_SIZE, RESOLVE_SIZE);
g.setForeground(strokeColor);
g.drawRectangle(cx, cy, RESOLVE_SIZE, RESOLVE_SIZE);
}
}
}

It's more visual clutter but better (familiar) affordance:

image

I though maybe circles would look prettier... But then I thought it seemed more likely to raise objects if there visual changes.

Hopefully folks will feel motivated to make further improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants