Guru: Confessions Of A Recovering RDi Outline Addict
May 22, 2017 Susan Gantner
As an unabashed RDi fan, my list of “favorite features” is pretty long, but right up near the top of the list has always been the Outline view for RPG IV. It was Outline that finally got me to move to WDSC (RDi’s predecessor) from its predecessor, CODE (a.k.a., CODE/400) many years ago.
I’ve long been amazed at the number of RDi users who say they don’t use Outline – some don’t even have it in their RSE perspective any more. I have always suspected that’s because they closed it by accident long ago and never had a chance to get to know Outline. That’s why one of Jon Paris’s first Four Hundred Guru tips years ago was about how to get your Outline back if you’ve lost it.
Outline has improved many times since I first became enamored with it – including being completely rewritten to dynamically update itself based on changes in the source. More recent changes include a search box, the ability to filter out unreferenced items, and the addition of parameter “names” from prototypes. And of course, all the features that won me over in the beginning are still there – variable definitions and prototypes at my fingertips and quick navigation to any subroutine or procedure in the source as well as a cross reference to where every variable, subroutine or procedure is defined, used, and modified.
Even so I find myself using Outline a lot less often these days, hence the title’s reference to being a recovering Outline addict. Why? Because so many of the things I once used Outline for are now available to me directly in the editor. For example, if I need to know the attributes of a field (especially externally described ones), I used to locate it my Outline. Lately though I’m much more likely to simply hover my mouse over the variable name in the source and I see flyover text that shows me the definition.
To navigate to a subroutine or procedure, before I would click on its name in my Outline to position to the actual routine. Now, I simply click on its name in the EXSR or procedure call statement and use the F3 shortcut (also available via Source > Open Declaration from the right-click context menu). Not only is it much more convenient, especially when my editor is in full screen mode, it is also much easier to get back to where I was originally (i.e., the EXSR or procedure call statement) by using Alt+Left (or, in my case on my Mac, it’s Alt+Command+Left) to return. The F3 shortcut (followed by Alt+Left to go back) also works to jump to the location of the definition of a variable in the source, in case you need to see more about its definition than shows in the flyover text or if you need to change the definition.
When writing new code, I once relied completely on my Outline to recall the names of the prototypes (for programs or procedures) that I wanted to call and what the required parameters were. Now, I can get that information in the editor via Content Assist, which comes up with a Ctrl+Space shortcut. If I type the first few letters of the prototype or procedure name, I’m positioned to it, otherwise I can scroll thru the list of suggestions until I find the one I want. After selecting a name from the list, the editor types the name for me, complete with the parentheses and the appropriate number of colons for the parameters. I can even use Content Assist to help fill in the individual parameters as well; it will supply a list of variables of the appropriate data type for each variable as reflected by the prototype.
I do still use Outline despite the fact that there are other ways of getting similar information in the editor. Sometimes it’s just easier to look at things in the context of the full Outline. For example, looking at a data structure and its subfields or looking at the full layout of a record in a file or looking at all the prototypes available in the program. I also use Outline to give me an overview of a program for hints about its structure – i.e., how many subroutines and/or procedures, how many prototyped calls, how many files accessed via file specifications. If I expand a field in the Outline, it shows me every line of code where it is referenced, including an indication (M) by the lines where the value is changed, and I can navigate to each line to take a look at the code. And sometimes it just seems easier to find things in the Outline (particularly when using the ability to sort the items by name and/or to filter by name and hide the unreferenced items) than to locate a variable in the code, for example.
For those occasions when I find myself using Outline a lot, I have created a special perspective that makes it easier when using a full-screen edit window. It consists of only two things: the editor and the Outline. To create one for yourself, start with the Remote System Explorer perspective (or your customized version of it) and simply close (by clicking on the X) all the views except for the two you want – the editor and Outline. You may want to adjust the size of the Outline by sliding the line between it and the editor. Then from the Window menu, choose “Save perspective as . . . ” and give your new perspective a name. I call mine “My Outline,” which fits well with my other special perspective, which I call “My RSE.”
Now that I have the My Outline perspective, here’s how I use it. I normally start work in “My RSE” – my own slightly customized version of IBM’s Remote System Explorer perspective. When I’m diving into RPG code, I double-click on a source member tab to go into full screen. Thanks to the features mentioned above, I can often work just fine without the Outline, or I can simply use the Fast view icon for Outline in the right margin to pop it out over the editor temporarily. But when I find I’m referring to Outline a lot in a particular edit session, all I need to do is click on the “My Outline” perspective near the upper right corner to get a “permanent” Outline sitting alongside my full screen editor. When I’m ready to go back to doing other things where I need other views from the RSE perspective, I simply click on My RSE perspective, then, if still in full screen edit, I double click on the member tab to go back to my normal RSE view of the world.
While I use Outline much less than I once did, it’s still right up there in my list of favorite RDi features. If you’re an Outline addict, too, I hope these ideas may have given you a tip or two on how you may be able to accomplish similar things another way or how to make Outline more easily accessible when editing RPG source.
I’ve produced a short video to reinforce what I’ve written. Feel free to check it out here.