Guru Classic: Giving RDi a Split Personality
June 19, 2019 Susan Gantner
A commonly asked question by RDi newbies is: “How do I view source in split screen like I can in SEU?” The answer is that you can’t do it exactly like SEU, but then why would you want to? The RDi editor offers far greater flexibility.
The original version of my tip on this subject was published back in 2007. Back then, the toolset we know as RDi was called “WDSC”. Quite a lot of other changes have occurred within RDi as well. Originally, a specialized perspective was required to make this feature work well. Today’s RDi works well without any special perspectives or plug-ins.
How do you split your RSE editor screen? There are basically two types of split screen modes and they are accomplished very differently. I’ll cover the easier one first, which is to split your editor screen into two views of the same source.
Having two views of the same source allows you to have one side of your screen showing your D specs or free-form declarations and the other the logic, for example. Since both views are editable you can easily add data definitions to your source member without losing your place in the logic. This type of split is very simple to do. Right click in the editor view and select View –> Open New View. The keyboard shortcut for this is Ctl-2. You can see an example of this “New View” support in Figure 1 below. To close the extra view, choose View –> Close View from the context (right click) menu.
For the more common type of source split–that is, splitting the screen with different source members on each side–there are two small secrets you need to know. First, to split the editor screen, you will use a click and drag action on the tab of one of the members you want to see in split screen. Drag it either right or left (for a vertical split) or to the bottom (for a horizontal split). While you are dragging, a split line will appear to indicate where the screen will split if you drop the tab at that point. If a horizontal split line appears, move further to the right or left until you see a vertical split line. Once you see the desired split position, simply drop the tab. See Figure 2 below to see what this looks like. I’m running with 9.6.0.6 of RDi in this image. If you’re at a different level the appearance may be a little different.
When you drop the tab, voila! The editor window will split. As you can see in the image below, a white bar appears above the tabs while in split screen mode which can be used for a double click to go to full screen on the edit window and back again.
If you have a large enough monitor that you want to split the screen again to see yet another member or two in the edit window, you can keep dragging member tabs to split the screen into any combination of horizontal or vertical splits.
In the original version of this tip, this is the point where I described a problem if you double-clicked the editor to make the editor window bigger and how to solve it. With enhancements made to Eclipse and RDi over the years, this problem no longer exists. So there is no need for special perspectives or plug-ins to get split screen to work, whether in full screen edit mode or normal Remote System Explorer mode. This tip just got quite a bit shorter!
There are 2 things that I didn’t mention in the earlier version of this tip. Since I have some extra space now, I’ll cover those here.
First, how do I un-split an RDi editor screen after I’ve dragged tabs around like this? In other words, how can I get the editor back into a single view? The answer is to reverse the dragging process. If you have dragged a member to the right to split it from the other members in the edit window, simply drag that tab back to the left to join the others. I typically drop the tab back right on top of another tab in the original view. If you drop the tab under the other tabs, you may find that it simply splits the screen horizontally. If that happens, simply grab the tab again and drag it back to the other tabs.
Second, if I have more than one monitor on my desk, can I have one or more completely separate edit windows for different members? You could do this even without multiple monitors but I’ve found it most useful with a second monitor. To do this, you use the same tab dragging technique as mentioned for splitting the screen. This time, don’t stop dragging when you see a line appear in the editor—keep dragging all the way outside your RDi window, for example, to a second monitor. Once part of your dragged tab appears outside the confines of the RDi window, an outline of an empty window will appear. When that window outline appears where you want to see the member source, drop the tab. The green box shown in the figure below shows the outline of where the split editor window will go when you drop it.
You will now have a completely separate edit window containing that member torn away from the main RDi window. Obviously, you can subsequently move or size this separate window as needed. If/when you want to put the separate edit windows back together again, simply drag the separated tab and drop it back on or near one of the other tabs in the editor, just as we did to un-split the editor window above.
Have fun with split edit screens in RDi. This is one split personality that comes in handy.
Susan Gantner, an IBM Champion and co-author of the popular Redbook, Who Knew You Could Do That with RPG IV, is one of the top speakers/writers/trainers on IBM i development topics. She is a partner at Partner400 and System i Developer, and she hosts the RPG & DB2 Summit twice per year with partners Jon Paris and Paul Tuohy.
RELATED STORIES
Who Needs Custom Perspectives in RDi? Part 1
Custom Perspectives In RDi, Part 2
A note about dragging a source tab outside the RDi window to make it a second window. This is counted as part of the current perspective only. If you then switch perspectives, the second window will vanish but the source member will still be open, just invisible and inaccessible until you switch back to the first perspective.
(I am on 9.6.0.4)
How does one do a split screen on a .sql member?