Eclipse - Same .Java file in split view?

Eclipse

Eclipse Problem Overview


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?

Eclipse Solutions


Solution 1 - Eclipse

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.

Solution 2 - Eclipse

Lars Vogel just announced (December 2013) in "Split editor implemented in Eclipse M4 Luna" that is is now possible possible!

Split editor implemented in Eclipse M4 Luna 4.4

This solves one of the oldest and most upvoted Eclipse bug: Bug 8009.

> The split editor functionality has been developed in Bug 378298, and will be available as of Eclipse Luna M4. The Note & Newsworthy of Eclipse Luna M4 will contain the announcement.
Current shortcut for splitting is:

> - Ctrl + _ for split horizontally, and

  • Ctrl + { for split vertically.

https://bugs.eclipse.org/bugs/attachment.cgi?id=214959

As commented by mahesha999, there is a clone option in menu Window > Editor > Clone which opens separate cloned window/tab (instead of split view inside the same tab) that can be dragged to the 2nd monitor.

Solution 3 - Eclipse

For two tabs:

Window > Editor > Clone

For same tab (as shown above):

Window > Editor > Toggle Split Editor

Solution 4 - Eclipse

I have implemented small plugin which can split view for any eclipse based editor and make a video have it's work, see video here http://www.youtube.com/watch?v=61yJF7LQ-bE. This plugins part of jboss tools, but can be installed. With it you can split editor view just by clickin CTRL+8 or window->New Editor(Side By Side).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionFedererView Question on Stackoverflow
Solution 1 - EclipseAlberto ZaccagniView Answer on Stackoverflow
Solution 2 - EclipseVonCView Answer on Stackoverflow
Solution 3 - EclipseEduardo MorenoView Answer on Stackoverflow
Solution 4 - EclipseMaksim AreshkauView Answer on Stackoverflow