You may know that one can split layout the editors in Eclipse by dragging the editor tab to any edge of the editor area. This works only if you have more than one editor. However there are times when I want to work on two parts of the same file. To do that I first do Window > New Editor to duplicate the editor and then drag it to split the editor in a side-by-side or top-bottom layout. But that is too many clicks and drags. I developed a simple Eclipse Plugin which will help you split the active editor either horizontally or vertically with a single click. It is based on some code I found here that was written by Dimitri Missoh (thanks Dimitri - I have given you credit in the source code of the plug-in). I adapted his code to suite our purpose.
Here is the screenshot:
Split Editor Plug-in is available on Eclipse Marketplace!
You can install it from the plug-in's update site:
http://sandipchitaleseclipseplugins.googlecode.com/svn/trunk/SplitEditorFeatureUpdateSite
Source code is here.
Works in Eclipse 3.4, 3.5 and 3.6.
Also available on Eclipse Marketplace.
Enjoy!
Here is the screenshot:
Split Editor Plug-in is available on Eclipse Marketplace!
You can install it from the plug-in's update site:
http://sandipchitaleseclipseplugins.googlecode.com/svn/trunk/SplitEditorFeatureUpdateSite
Source code is here.
Works in Eclipse 3.4, 3.5 and 3.6.
Also available on Eclipse Marketplace.
Enjoy!

9 comments:
This functionality is also provided by the Emacs+ plugin, with the "split-window-horizontally" and "split-window-vertically" functions, which are easily bound to keys. The fact that it doesn't provide a mouse-clickable icon to do this is not missed by me at all.
Thanks for that info David. It it possible to add key bindings to commands Split Editor provides also using the General > Keys preferences page. I did not add them by default to leave it to personal taste.
I real happy to find this internet site on bing, just what I was searching for : D likewise saved to my bookmarks .
nice plugin, very usable :-)
Is it possible to switch between horizontal and vertical?
Yes. There are two toolbar button - one for horizontal split and one for vertical split.
I love this tiny-yet-usefull plugin. I have one comment though...
I've just installed SplitEditor version 1.0.5 on Eclipse 3.7.1 and I noticed it depends on 3.6 (so a lot of eclipse 3.6 was installed in the process). Is this really necessary?
@Anonymous...can you tell me what you mean by a lot of "eclipse 3.6 was installed in the process". If you mean that you see some plugins are at version 3.6 that is normal. Eclipse folks increment the version numbers only when there is a change and hence some plugins may still be 3.6. Or are you saying that you actually saw it downloading older versions on the plugins?
Nice enhancement. I miss only an "open with ..." under the arrow to open the same file with another editor (without right-clicking the file first)
Post a Comment