Guru Classic: Custom Perspectives In RDi, Part 2
March 6, 2019 Susan Gantner
In my earlier tip I described how to create a custom perspective and I also described one scenario when custom perspectives come in handy. I promised to follow that up with another way to use custom perspectives.
I’m often asked questions such as:
- How do I keep my Outline from disappearing when I’m in full-screen edit?
- How can I see my RPG Indentation view alongside the full-screen editor view of the source member?
Custom perspectives can be used as one answer to both questions.
Of course, when you’re in full-screen edit, you can “peek” at any of your views (such as Outline or RPG Indentation) by clicking the appropriate icon in the margin (called a Fast View). Click on the Outline icon (same as the icon on the tab for Outline in the figure below) and the Outline pops out over the full-screen edit window. However, when you do it that way, as soon as you click your cursor back into the editor window, the Outline closes back to the icon.
If you want the Outline to remain visible all the time you’re in full-screen edit, then you’ll need to take some other action. There are other solutions, but the one I would choose is to create myself a special-purpose perspective containing only the Editor and the Outline.
It may sound complicated but it really is pretty simple and you only need to do it once. I’d advise that you save your current RSE perspective using a name of your own choosing before starting the process. The earlier tip referenced above goes into detail on how to do this. You are about to start moving things around and if you make a mistake and want to start over, you will be very happy to be able to use Reset Perspective to get back to your previous incarnation.
I’m going to describe the steps to do this assuming that you are starting from a perspective that looks similar to the original default RSE perspective as it came from IBM. Click here to see a short video I made of this process.
Starting with your RSE perspective — without being in full screen edit — so you should see Remote Systems to the left of the editor, outline to the right of the editor, etc. (assuming you have made only minor tweaks to the “out of the box” RSE perspective.)
Next, one at a time, you will close all the views EXCEPT the editor and the Outline – those 2 views you will leave as is. As an example, I would tend to close (by clicking the X in the tab) views such as Remote Systems, Team (typically alongside Remote Systems), Properties, Remote Scratchpad (typically alongside Properties), and all the views in the group below the editor – such as Remote Systems Details, Tasks, Object Table, Error List, Terminals, etc.
Now you should have only the editor and the Outline left in the window, side by side. You may want to drag the edge between them to adjust for the size and shape of your monitor. An image of my version of this is shown below.
Now do Window > Save perspective as > and give it a new name — maybe call it something like “Outline”. Now you can see this new perspective (upper right corner highlighted above). Note that if you’re at V9.6 or later, by default the perspective name doesn’t show up with the icons for your perspectives in the top right of your workbench. I covered this and details on how to show the perspective name in the earlier tip.
You probably also want your RSE perspective available as well. If you don’t see Remote System Explorer (or your own version of it) in the list of perspectives at the top right, use Window > Open Perspective > and choose either the standard IBM Remote System Explorer or (better yet) your own saved version of RSE.
Now when you want to do full screen edit (with outline view visible) then click on the perspective you just created in the open perspective icon collection at the top right of your screen. When you want to use the full RSE capability, click on the Remote System Explorer perspective, or your version of it. You will now switch back and forth between these two perspectives in this way instead of double clicking at the top of the editor window for a full-screen editor.
In my figure above, I am showing the text for the perspective names to distinguish them. Unfortunately, I haven’t found a simple way to change the icon associated with a custom perspective created in this manner. So without the names showing, the only way to distinguish your RSE perspective from your new Outline perspective is via hover text on the icon. For that reason, I suggest that you either show the text — and choose very short names — or get accustomed to using hover text to switch back and forth between perspectives with your mouse. Alternatively, you can use the keyboard shortcut Ctrl+F8 (or command+F8 on Mac) to switch between your open perspectives.
So now that we’ve walked through how to make a perspective with just the editor and outline, you could follow a similar set of steps to create any combination of views you want. If you edit old fixed-format code frequently, for example, you may want to create a similar perspective with the editor and RPG Indentation views. In that case, I suggest that you reposition the RPG Indentation view to the right side of the workbench from its typical position underneath the editor. That way you’ll be able to see the views side by side, which tends to work much better. To reposition it, grab the tab and drag it toward the right edge of the workbench. Drop it when you see the vertical split line appear.
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.