Eclipse – Same .Java file in split view

eclipse

Perhaps this is a trivial question, however it's something that is seriously annoying me. I'm editing someone's program at the minute and one of their .java files is absolutely massive. I'm trying to edit it at the moment, whilst referencing it as well.

Is it possible to split the screen in Eclipse, to allow a split view of the same file?

Best Answer

A. Window -> New editor

or (slightly quicker)

B. Right-click on the tab with the code you want to see in another split view and choose "New Editor" to duplicate this tab in the same editor window (i.e. without having to open a completely new editor window as in A.)

Then drag the new tab to the right until you see an arrow, then lift your finger. Doing it this way the two views will be in sync: everything you change on the left will change on the right.