-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Code mining] Editor content jumps around on every save in 4.35 #2786
Comments
@tobiasmelcher : could you please check, I believe you've contributed few changes in this area? The one in question could be 9b78e0f. The editor content jumps now visible every time a new line is added and file is saved in java editor, before (4.30) it was not that visible. Without looking into the code/debugger for me it looks like the code minings are painted / re-layouted more times as before, so the effect of jumping editor lines is much more visible or the paint/re-layout operation is longer. |
sure, I will take a look. Please give me some time to understand the scenario. |
I personally never use code minings because I don't like the "dynamic" behavior of the editor where something changes without asking me doing that, but now playing with different releases from 4.30 to 4.35 master I believe it is really multiple redraws and it is regression in 4.35 to 4.34.
Note, in the videos I've recorded the frame per second was too low so actually 4.34 looks like it has no repaints, but it has at least one. 4.35 does way to much and video shows only half of that, but that is enough I believe. |
So it looks like adding a line to a document and saving it forces more code minings work/artifacts painted in 4.35 compared to 4.34. |
Thanks for clarifying that. I hope this can be captured in a test; I suspect we should be able to count the amount of codeMining painted in test code and set up some expectations with JUnit to identify regressions. |
it should never return 0. Fix race condition when code minings are not yet available. eclipse-platform#2786
Could you please test with the change from #2787 ? Is the editor content then still jumping around? |
Looks much better now. See also #2788. Feel free to improve tracing, since I'm not familiar with the code I've just added it in two places that I assumed were relevant. The number of redraw printouts is decreased with your pr. |
it should never return 0. Fix race condition when code minings are not yet available. eclipse-platform#2786
it should never return 0. Fix race condition when code minings are not yet available. eclipse-platform#2786
it should never return 0. Fix race condition when code minings are not yet available. eclipse-platform#2786
Let's make sure issue is not already fixed in latest builds first.
The issue is reproducible with Eclipse 4.35.0 Integration Build: I20250209-1800 Unstable!
Steps to reproduce
From a fresh installation and clean workspace:
You will see the following issue:
code_minings.mp4
I expected: Code mining should not overlap like before.
But got: The overlapping issue with code mining, already present in earlier versions, has worsened in 4.34. Upon closer inspection, it seems that code mining elements are reloaded/repainted twice instead of once, as in versions before 4.33.
This behavior also causes lines to shift, with new lines constantly being added and removed, making code mining unusable in larger projects!
Tested under this environment:
Community
The text was updated successfully, but these errors were encountered: