Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Split screen editor in Eclipse?

 
Gary Udstrand
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am currently using IntelliJ and their implementation does allow split screen editing. The problem is that it is limited to the same file.
Does Eclipse have a split screen editor? If so does it allow you to have multiple files opened?
Thanks
-Gary
 
Faisal Khan
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am no expert in Eclipse, actually a total beginner but am getting to grips with it. It is indeed possible to split windows and open multiple files at once and as they say get it straight from the horse's mouth, here is what the tutorial on editors tells you:
"You can stack editors in the editor area and activate individual editors by clicking the tab for the editor. You can also tile editors side-by-side in the editor area so their content can be viewed simultaneously. In the figure below editors for sample.txt and otherFile.txt have been placed one above the other. We will discuss how you can rearrange views and editors later in this tutorial."
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does Eclipse have a split screen editor? If so does it allow you to have multiple files opened?

Yes. Eclipse allows split screen editing on multiple files but I believe you can't open the same file in two editors at the same time.
The split screen is achieved by the following:
1) Open multiple files (e.g. Controller.java, View.java and Model.java). They should now be stacked using tabs and the latest file, say Model.java, being "active".
2) Now left-click (don't release) on a "View.java"'s tab, drag the cursor to the lower edge of the active editor, wait a second so that the cursor changes into a black filled arrow, and release the mouse button. Voila, the two files (Model.java and View.java) should be now vertically split.
3) Now left-click (don't release) on "Controller.java" tab, drag the cursor to the right edge of one of the already open editors, wait a second so that the cursor changes into a black filled arrow, and release the mouse button. Voila, all three files are split into the screen.
 
Michael Zalewski
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can open the same file twice.
Do Window | New Window, then open the source file in each window. What you type in one window appears in the other as you type.
But this is not a 'split window' like IntelliJ. However, it provides some of the same functionality. For example, you can scroll the first window to where your fields are declared, and the second window can be positioned at the method you are working on. Then you can add new fields to the first window, and add code to the second window. Saving from either window saves both changes.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do Window | New Window, then open the source file in each window. What you type in one window appears in the other as you type.

Thanks, Michael. I hadn't tried that.
 
Ed Burnette
Author
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's an open enhancement request that you can vote for:
http://bugs.eclipse.org/bugs/show_bug.cgi?id=8009
 
Bill Zelan
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Managed to find this video which helped me a lot. Figured I'd post this here as it's one of the top results from Google on this topic.

http://vimeo.com/2862316?hd=1
 
Jeffrey Tian
Ranch Hand
Posts: 37
Eclipse IDE Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found a way to open same file in different editor window.
. Right click the file name(it's also the tab title)
. Select New Editor, then you have 2 files with the same name opened in the same window.
. Drag one file to other window.

In this way, you can open the same file more than twice in different windows or the in same window. You edit in one window, copies in other windows will be modified simultaneously.
 
Isaac Saito
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeffery's idea works out perfect. Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic