Page 1 of 1

VL IDE - Find Usages

Posted: Fri Mar 23, 2018 7:20 am
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 16314 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 16314 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?

Re: VL IDE - Find Usages

Posted: Sat Mar 24, 2018 12:59 am
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 16302 times
I start a text seach:
Find used MthRoutine (2).PNG
Find used MthRoutine (2).PNG (13.26 KiB) Viewed 16302 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 16302 times

Kind regards,
René

Re: VL IDE - Find Usages

Posted: Sat Mar 24, 2018 1:20 am
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!

Re: VL IDE - Find Usages

Posted: Mon Mar 26, 2018 3:26 pm
by atostaine
Text search also locks up my ide for about 30 seconds before it finishes

Re: VL IDE - Find Usages

Posted: Mon Oct 05, 2020 9:03 pm
by angelo
if you are in a hurry....

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

bye