Taking RSE to Task
April 6, 2011 Paul Tuohy
Recently, I have been working on a modernization project with a client. Part of this project has involved me scanning and analyzing a number of legacy programs looking for patterns, commonalities, and such.
In this article, I want to highlight a feature of RSE (Remote System Explorer) that has proved very helpful in the above process: Tasks and Bookmarks.
Tasks and bookmarks provide an easy mechanism for defining tasks and, if required, placing a corresponding “marker” in a source member. In the past, you might have done this by printing off a source listing, highlighting some lines of code with a highlighter, and jotting some notes on the page. Or you might have put some special comments in the code that you could easily scan for later.
I am using IBM Rational Developer for Power Systems Software V8, but Tasks and Bookmarks are just as applicable in RDi and WDSC.
Adding a Task
When you are editing a source member, find the line of code that you want to set a task for and right-click on the gray bar to the left of the sequence number. From the resulting context menu, take the option to Add Task, shown in Figure 1. The red box in Figure 1 shows where to click. Alternatively, select Edit→Add Task from the menu.
You will be presented with a Properties window, shown in Figure 2. By default, the Description contains the line of code, but you will probably want to change it to something meaningful. In this example, I will change the Description to “Change Starting Event.” You can also set a Priority (low, normal, or high) for the task and indicate whether or not the task has been completed (although I am not sure why you would be flagging a new task as completed). Although the other three items in the Properties window (On Element, In Folder, Location) look like input capable fields, they aren’t and you cannot change them.
When you click OK in the Properties window, the task is added to the Tasks view, as shown in Figure 3. The Tasks view is usually included in the RSE perspective by default but, if for some reason it has been dropped, you can add it from Window→Show View→Other, then, in the Show View window, expand General, and select Tasks from the list.
You will also notice that there is now a Task icon in the gray bar, next to the line number where you defined the task, as shown in Figure 4.
Now comes the fun part! Close the source member. Now double click on the Task (in the Tasks view), and the source member is opened with the cursor is positioned at the task line. NOTE: It is the local version of the source member in the workspace that is opened.
Adding General Tasks
It is possible to add tasks that are not associated with a particular line of code. Right-click in the Tasks view and select Add Task from the context menu. You will be presented with an empty version of the Task properties window shown in Figure 2. And you still cannot enter On Element, In Folder, or Location.
Take the time to consider key words that you might want to use in task description. When you end up with a lot of tasks, the Tasks view provides a very powerful means of filtering tasks.
From the menu for the Tasks view, shown in Figure 5, take the option to Configure Contents. The menu is available from the down arrow in the top right corner of the Tasks view.
The resulting Configure Contents window is shown in Figure 6. It currently contains a filter named TODOs, which is defined to list any tasks where the text contains the word TODO.
To add a new task filter, click on the New or Duplicate button, name the new filter, and define it as required. Figure 7 shows the Filter Name window presented when defining a new Task filter.
When your filters are defined, they are readily available from the Tasks view menu, as shown in Figure 8. Simply select the required filter from the Show option on the menu.
You can change the properties for a task by right-clicking on the task and selecting Properties from the context menu. Or get rid of a task by right-clicking on the task and selecting Delete from the context menu.
As tasks are completed, simply tick the completed box.
To drop completed tasks, right-click in the Tasks view and select Delete Completed Tasks from the context menu.
Bookmarks are practically identical to Tasks and I will leave it to you to explore them for yourself. The major difference is that the Bookmark view is not enabled by default in the RSE perspective. Add it from Window→Show View→Other, then, in the Show View window, expand General, and select Bookmarks from the list.
If Tasks and/or Bookmarks are a little bit more than you are looking for and you simply want a means of marking locations in your source member, then have a look at Marks, which you can find here: Edit→Add Mark and Edit→Find Other→Find Mark.
Tasks and Bookmarks are RSE features I have found very useful when plowing through multiple source members, looking for commonalities, and trying to remember to come back and look at something. I hope you find them useful as well.
Paul Tuohy is CEO of ComCon, an iSeries consulting company, and is one of the co-founders of System i Developer, which hosts the RPG & DB2 Summit conferences. He is an award-winning speaker who also speaks regularly at COMMON conferences, and is the author of “Re-engineering RPG Legacy Applications,” “The Programmers Guide to iSeries Navigator,” and the self-study course called “iSeries Navigator for Programmers.” Send your questions or comments for Paul to Ted Holt via the IT Jungle Contact page.