Little Things Mean a Lot in RDi 9.6
IBM i development experts Jon Paris and Susan Gantner review new enhancements to RDi.
By Susan Gantner
We have written about some of the big enhancements to RDi that have come during the 9.6 release of RDi, such as hover and annotation enhancements and the massive changes to the Object Table. We even created a video of a few of our favorite 9.6 enhancements.
Here we'll cover a few of the smaller features that were overshadowed by the flashier ones. We think that you'll agree with us that when it comes to new features in RDi, even little things can have a have a big impact on productivity.
How many times have you risked opening a member for edit from Remote Systems because it was just too much hassle to right click and say "Browse with …" instead? Then, you just hope you don't accidentally make changes to the "wrong" member—or at least if you do, you notice it before closing it so that you can undo them!
No need to live in fear of edit anymore! As of 22.214.171.124, after opening a member for edit, you can now easily switch it to browse mode. You can do this via the pulldown from the Source menubar - the "Toggle Edit/Browse Mode" option. Then again, even that takes more time than the "Browse with…" option we were avoiding. Fortunately, there's a keyboard shortcut: Ctrl-Shift-G on Windows or command-shift-G on Mac.It's also much easier to tell now which members are open for edit and which for browse. The icon preceding the member name in the Editor tab shows either a magnifying glass (browse) or a pencil (edit) as shown in the figure below.
More Flexible Block Nesting
For those times when you're trying to make sense of nested logic in old fixed-format RPG code, more help has arrived. If you edit fixed-format logic often you probably already know how helpful the "Show Block Nesting" feature is. In case you don't recognize the name, it's often invoked via the Ctrl-Shift-O (or command-shift-O in Mac) shortcut in the editor. You should also recognize the feature in the figure below.
The Block Nesting feature has been improved. You no longer need to be positioned at the beginning or end of a code block. You can now be positioned anywhere in the block—including a subroutine or procedure—and have the nesting shown for the block where you are. You can also position on ELSE, WHEN or OTHER to find the beginning and end of the block they belong to. The level to which each ELSE/WHEN/OTHER statement belongs is also visible in the block illustration.
In addition, nesting up to 15 levels can now be highlighted. It's a sad commentary on old RPG coding techniques to think that support for that many levels is necessary! But the happy side effect is that the lines and arrows are longer and therefore a bit more visible even for less deeply nested logic as shown below.
Zoom In/Out in Your Code
If you’ve ever wanted a quick way to increase (or decrease) the font size inside your edit window, you can now (as of 126.96.36.199) use the keyboard shortcuts Ctrl + and Ctrl - (use command in place of Ctrl on Mac). The + will increase the font size in the currently active editor window (only). You can use the keys repeatedly to keep changing the size until it's what you want.
This comes in very handy when you're asking for help from a colleague to help find the problem in the logic you've been working on. It makes it far easier for someone to read the code over your shoulder.
There's not much more to say about this—the figure below illustrates the effect. In our example we did Ctrl + four times to get the difference in font size shown.