Monday, October 29, 2007

Leverage Eclipse perspectives for different screen layouts

At work I use a three monitor setup for Java development. The machine is based on Windows XP and Eclipse 3.3. The individual views are spread out across the middle and right screens, the left one is mostly used for browser and email windows. Because I usually use a rather large font for code editing the center screen is entirely dedicated to the code editor.  The right screen contains outline, call hierarchy, source history, a console view, the package explorer and the task/warnings lists. All in all each and every pixel of this 2560x1024 area is used effectively for Java development.

However in the evenings I sometimes like to complete some unfinished task at home. Thanks to a VPN connection I have full access to the CVS server and everything else I need. However I do not want to have to synchronize and download all changes to the laptop before I start. Usually I leave open Eclipse on my office PC all the time. To save time I just connect to it via RDP. The problem with that is however the limited resolution of the laptop screen - it is only 1400x1050. I used to have VNC running and scroll left and right to see all of the office screens, but it is just to slow and there are keyboard issues with the notebook keyboard.

The main disadvantage with this setup was Eclipse - because the RDP resolution is smaller than the office desktop I could only see a small part of the views on the right screen. The first few times I reset the Java and Debug perspectives to their default configuration which docks all views inside the main window. While this worked, it is a real pain to rearrange the views again when I came back to work the next morning.

It took some time until I remembered the "Save perspective" feature. I have now set up my "normal" Java and Debug perspectives - stretched out across two screens - and a "single window" version for each of them. The only thing that needs to be configured now when I switch from desktop to laptop mode is found in the Window - Preferences - Run/Debug - Perspectices menu: When working from home I define the "simple" perspectives as the defaults, at work I choose the multi-head versions.

No comments: