Author |
Topic |
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Apr 02 2020 : 12:52:38 PM
|
We don't currently support C# Local Functions, but are aware this:
case=99749
For when we do try though, would you really expect to see them listed in the Find Symbol dialog? All of the examples given on the page you have linked to are showing Local Functions as existing inside the parent function, so not accessible outside of the parent function.
I can see it making sense to list these in the Alt-M list and VA Outline, but I am not sure about Find Symbol dialog. Or do you have a reason why they should be there? |
zen is the art of being at one with the two'ness |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Apr 02 2020 : 1:36:47 PM
|
Well, in a certain way, often you know that there was a function named "ReadDataFrom..." but you dont really remember if thats local or global, yet you wont to get there. As for outline and Alt+M, i think its really nice to have, but even VS doesnt show it correctly everywhere (hint, hint), for example VS's Goto doesnt show them anywhere. But besides all that, it doesnt really break anything serious in VA it seems. |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Apr 02 2020 : 2:24:39 PM
|
Find References and Goto are already supported on local functions. The VA Nav Bar shows context and definition when caret is on either invocation or definition. If those features are not working for you, it may be that our examples are not complex enough.
Methods in File (alt+m) support is considered a feature request (case=140866). The behavior for local functions is similar to local variables which also do not appear in the alt+m list or the Find Symbol in Solution dialog. |
Edited by - sean on Apr 02 2020 2:25:08 PM |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Apr 03 2020 : 06:29:47 AM
|
Yes, Find References and Goto work correctly for local funcions. As reported, nav bar errs only in coloring but shows local function correctly. (ah, and the code tooltip in VA Find References is still an uncolored basic tooltip, but thats already a case if I am not mistaken.) |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Apr 03 2020 : 09:42:30 AM
|
Is the colouring error the colour of "bool", or is there another error in the nav bar colouring as well? "bool" always being coloured by VA as a function outside of the editor is currently a known bug:
case=141535
which happens outside of Local Functions. |
zen is the art of being at one with the two'ness |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Apr 03 2020 : 10:03:53 AM
|
Didn't notice anything beside that "bool" yet. |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Apr 04 2020 : 07:36:09 AM
|
Hopefully it is just this then, but obviously, do please let us know when you notice something else not quite right. |
zen is the art of being at one with the two'ness |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Jul 08 2022 : 04:56:42 AM
|
Is there any progress on local functions in the methods list? Just had to deal with a 6k lines method with dozens of local methods spread all over (please dont ask why, real life happens) |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Jul 08 2022 : 06:38:33 AM
|
Unfortunately no progress to report on this, but C# local methods is something we are aware of, and it is still on our list of things to support better. It hasn't come up much since you first mentioned it, so knowing you still need this helps a bit.
I know there are some situations that work best with large methods, but 6k lines does seem a little large. Good luck, you may need it. |
zen is the art of being at one with the two'ness |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Jul 08 2022 : 07:26:01 AM
|
May need more than luck here, hahahaha |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Jul 11 2022 : 07:51:16 AM
|
I don't suppose suggesting Extract Method helps much? Plus this assumes you have the time / permission for some refactoring work. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|