How can I make Eclipse scroll the bottom of the document?

When I scroll to the bottom of the open document in the Eclipse editor , the last line is at the bottom of the file. This is a bit annoying when editing the code at the bottom of the file / screen.

How do I enable Eclipse to scroll (like Vim or VS) far enough so that the last line of code reaches the top of the editor window?

I ask you to return to this question in Eclipse : How do I get the Visual Studio editor to stop scrolling at the bottom of the file?

+48
eclipse editor ide configuration
Feb 04 '10 at 3:55
source share
1 answer

Given the current implementation of the scrollbar, this is not possible.
(See org.eclipse.swt.widgets.ScrollBar.java )

At any given moment, a single โ€œchoiceโ€ will be selected on a given scroll bar, which is considered its value, which is limited by the range of values โ€‹โ€‹that the scroll bar represents (that is, between its minimum and maximum values).

In the JDT (Java Editor) area, the range is strongly related to the number of lines that the source file has.
Adding artificial โ€œlogical linesโ€ to scroll past the line will have unforeseen consequences for many other parts of the JDT related to displaying information based on the line number of the source file (for example, a red underline compilation).

That is why there is no soft packaging in these editors, despite a 7-year error 35779 (one of the most popular).

Allowing the word / soft wrapper in the editor when typing is easy, but not enough, the comparison between the model lines and visual lines should be displayed , for example. show annotations correctly.
He also introduces various problems that need to be addressed, for example. "Go to Line": tools like debugger, compiler, etc. They will report about the model, but the user will look strange that a different line will be selected than the one entered in the "Go to line" dialog

So, now the SWT-scrolling example is still limited to the bottom of the window:

http://www.java2s.com/Code/JavaImages/ScrollBarExample.PNG

+32
Feb 04 '10 at 7:08
source share



All Articles