I frequently need to analyze or modify legacy code that has numerous large subroutines. When scrolling through the code and especially when searching for a field name or string within the code, it would be really nice to be able to quickly see what subroutine I landed in. Is there a way to have the outline highlight the subroutine I'm in based on the cursor position, or do I just need to find the previous BegSr opcode?
Announcement
Collapse
No announcement yet.
Where Am I in RDi?
Collapse
X
-
To clarify for anyone with a similar question who finds this post - Ctrl-Shift-O is "Show Block Nesting" (can also be found in Right-Click -> Source)
It adds arrows next to the sequence numbers that link conditional start statements (IF, DO, BEGSR, etc.) with their corresponding end statements.
If you use it on a conditional start/end statement it displays arrows for that conditional, and any other conditionals inside it
If you use it on any other line type of line and you are within a subprocedure or subroutine, it adds arrows for the all conditional statements for the subprocedure/subroutine start/end statements (P-spec B/E, DCL-PROC/END-PROC, BEGSR/ENDSR) and all the conditionals it contains. Then you can just scroll up to where the arrows stop and you will be at the start of the subprocedure/subroutine, so you can see which one it is.
It's not particularly efficient, but I'm not aware of a better way. I would also really like it if Outline View to auto-highlight the subroutine/subprocedure that the cursor is in
Comment
-
Just thought of an alternate method, in case anyone still cares
Ctrl+Q to set a Quick Mark on the current source line
Ctrl+F, type "begsr", and click Previous (Tab, Tab, Enter will also do Previous) to find and go to the closest BEGSR above the current source linee - you can now see the subroutine name
Alt+Q to return to the Quick Mark-ed source line
Also not ideal, but it's doable entirely from the keyboard
And you can also use the Quick Mark to return to your source line if you use the Show Block Nesting method
Comment
-
Originally posted by Vectorspace View PostCtrl+F, type "begsr", and click Previous (Tab, Tab, Enter will also do Previous) to find and go to the closest BEGSR above the current source linee - you can now see the subroutine name
Comment
-
Originally posted by gregwga50 View Post
I think the FIND/REPLACE function in RDI really sucks. Whenever you press CTRL+F, whatever was in the FIND box from the last search you performed is still there and it starts searching for that. It would be nice if CTRL+F would just give you a "blank" box to key your search argument in instead of starting to search before you even have a chance to key in a search argument and press FIND. I wish they would fix this.
Comment
-
Originally posted by taherte001 View PostIf you have access to Developer Works, here is an RFE you may be interested in voting for:
Also, if you use continuation in the procedure name on the p spec (e.g. getDefaultPrinter...), CTL/SHIFT/O will not display the subprocedure name.
Sorry, the page you're looking for cannot be displayed
Please try again later.
Regards
Kit
http://www.ecofitonline.com
DeskfIT - ChangefIT - XrefIT
___________________________________
There are only 3 kinds of people -
Those that can count and those that can't.
Comment
-
A nice list of some of the shortcuts can be found in here http://systemideveloper.com/downloadRSEShortcuts.html (thanks John).Regards
Kit
http://www.ecofitonline.com
DeskfIT - ChangefIT - XrefIT
___________________________________
There are only 3 kinds of people -
Those that can count and those that can't.
Comment
-
Originally posted by jtaylor___ View Post
If you don't like the default behavior, just change it. Window=>Preferences. Try "Find Text" under "LPEX Editor".
Thanks for sharing that tip.
Comment
Comment