VL IDE - Find Usages

Please log all suggestions for improvements and enhancements to Visual LANSA here. Entries may be acknowledged and may be added to the list for possible inclusion in later releases of Visual LANSA.
Post Reply
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

VL IDE - Find Usages

Post by jyoung »

There are times when I need to find all the components that are calling a particular method.

For example, I need to find everything that calls this method

Code: Select all

mthroutine name(SwitchToBurden) access(*PUBLIC)
* code omitted
endroutine
I can F2 that method and see it the features window and the Usage only shows it in the context of the current component, and in this case its just the definition.
features_window.PNG
features_window.PNG (21.56 KiB) Viewed 207223 times
Since that does not help, I have to go to the cross references, and open EVERY SINGLE OBJECT displayed and look for that particular method call.
cross_references.PNG
cross_references.PNG (31.23 KiB) Viewed 207223 times
My other option is to change the method name and recompile everything to get anything that calls that method to break.

It would be much better and more developer friendly IMHO if the Features window (or something else) could show what is calling that particular thing, in this case a method. Something like Visual Studio's and Resharper's Find Usages.

Anyone know of a better/different way to find the usage of a method in the VL IDE?
René Houba
Posts: 220
Joined: Thu Nov 26, 2015 7:03 am

Re: VL IDE - Find Usages

Post by René Houba »

Hi,

Simply do a Text Search....

I have this mthroutine in a RUP:
Find used MthRoutine (1).PNG
Find used MthRoutine (1).PNG (6.46 KiB) Viewed 207211 times
I start a text seach:
Find used MthRoutine (2).PNG
Find used MthRoutine (2).PNG (13.26 KiB) Viewed 207211 times
The search result shows all the components that uses this mthroutine, included the line where is is activated:
Find used MthRoutine (3).PNG
Find used MthRoutine (3).PNG (134.98 KiB) Viewed 207211 times

Kind regards,
René
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: VL IDE - Find Usages

Post by jyoung »

Hmm, once again there is little button in the IDE that I have never clicked on. :roll:

That works, although it takes awhile, about 3 minutes on my box, of course that is faster than me opening all those components and looking for it.

Thanks!
atostaine
Posts: 696
Joined: Wed Jan 20, 2016 7:38 am

Re: VL IDE - Find Usages

Post by atostaine »

Text search also locks up my ide for about 30 seconds before it finishes
Art Tostaine
angelo
Posts: 9
Joined: Thu May 05, 2016 12:00 am

Re: VL IDE - Find Usages

Post by angelo »

if you are in a hurry....

select * from mylansadb.lx_dta.lx_frd where upper(xrdPRM) like '%.MY_METHOD%'

bye
Post Reply