-
Notifications
You must be signed in to change notification settings - Fork 188
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
Sticky scrolling in Eclipse #1894
Sticky scrolling in Eclipse #1894
Conversation
Test Results 605 files - 1 210 605 suites - 1 210 22m 25s ⏱️ - 1h 8m 42s Results for commit f2c9b50. ± Comparison against base commit 385b30b. This pull request skips 4 tests.
♻️ This comment has been updated with latest results. |
bundles/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
Show resolved
Hide resolved
...ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditorPreferenceConstants.java
Outdated
Show resolved
Hide resolved
Just wanted to say this looks awesome & a great modernization effort for the Eclipse IDE :) Great work |
That's a very interesting proposal and the quality already seems good! |
In general I believe adding first type in the file wastes space / just duplicates already shown information, as the first type is already shown in the editor tab title. On Linux I see the right side of the "sticky" widget is shown one pixel over the scrollbar, as seen in the screenshot above. Beside this, I would wish a bit different background for the sticky part, as it is hard to differentiate from actual code (also seen in the screenshot above). |
bundles/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
Outdated
Show resolved
Hide resolved
I think yes. How do other IDEs solve this? |
That's a good idea to get started from. |
Yes, that's a good idea. I will finish the work on the layout and on the fallback logic based on indentation. Afterwards we can have a look how we can implement the annotation logic. |
Regarding redundant Having sticky scroll use the folding functionality sounds like a good approach. Having conditionals not stick yet sounds more like a missing feature on the folding side to me. |
This is a very important feature that eclipse is lacking (and I get asked about a lot!). |
874960d
to
c205d5d
Compare
Yes, most probably you are right and this could also be improved in the code folding in general. However, I propose merging this change as a "beta feature" after addressing layout questions and providing unit tests. Since the feature is disabled by default it should not have any impacts on the daily work. And having it in the official eclipse release will increase the amount of tester significantly. Even I don't use my target IDE in my daily work, so it's hard to test every single editor feature, like quick fixes, etc. The sticky scrolling based on annotations/code folding can then be implemented on a separate PR. |
9eeebb2
to
f2fda23
Compare
That's a good idea. |
f2fda23
to
f2c9b50
Compare
With this change, sticky scrolling is introduced into Eclipse text editors. Sticky scrolling will keep certain source code lines visible and in a fixed position on the screen as the user scrolls down the page. This technique improves user experience by keeping information within reach at all times. The feature can be enabled via the TextEditor settings. Provides feature for eclipse-platform#1719 and eclipse-jdt/eclipse.jdt.ui#1364
f2c9b50
to
7a93201
Compare
I'm merging this right now because the current code and feature quality are already good and it's the right time to push such experimental features in. |
The calculation of the sticky-scrolling lines is now throttled, executing only every 100 ms, to prevent potential performance bottlenecks. Follow up to eclipse-platform#1894
The calculation of the sticky-scrolling lines is now throttled, executing only every 100 ms, to prevent potential performance bottlenecks. Follow up to eclipse-platform#1894
The calculation of the sticky-scrolling lines is now throttled, executing only every 100 ms, to prevent potential performance bottlenecks. Follow up to #1894
Scrolling on the sticky lines control is dispatched to the linked source viewer. With this change the source viewer's scrolling behavior remains consistent, regardless of whether sticky scrolling is enalbed or not. Follow up for eclipse-platform#1894
Scrolling on the sticky lines control is dispatched to the linked source viewer. With this change the source viewer's scrolling behavior remains consistent, regardless of whether sticky scrolling is enalbed or not. Follow up for eclipse-platform#1894
Scrolling on the sticky lines control is dispatched to the linked source viewer. With this change the source viewer's scrolling behavior remains consistent, regardless of whether sticky scrolling is enalbed or not. Follow up for eclipse-platform#1894
Scrolling on the sticky lines control is dispatched to the linked source viewer. With this change the source viewer's scrolling behavior remains consistent, regardless of whether sticky scrolling is enalbed or not. Follow up for eclipse-platform#1894
Scrolling on the sticky lines control is dispatched to the linked source viewer. With this change the source viewer's scrolling behavior remains consistent, regardless of whether sticky scrolling is enalbed or not. Follow up for #1894
Description
With this change, sticky scrolling is introduced into Eclipse text editors, as it is available for many other modern IDEs. Sticky scrolling will keep certain source code lines visible and in a fixed position on the screen as the user scrolls down the page. This technique improves user experience by keeping information within reach at all times.
The feature can be enabled via the TextEditor settings.
Provides feature for #1719 and eclipse-jdt/eclipse.jdt.ui#1364
Current state
There are some TODOs left, however the general functionality should work. I'm already creating the PR to get early feedback and maybe there are some volunteer beta testers.
Testing
Enable the feature in the preferences: General > Editors > Text Editors
Check "Enable sticky scrolling"
The sticky lines should be visible in all source/text editors and should work for every language since it is working on line indentation.