DavidFeldhoff / al-codeactions

MIT License
17 stars 8 forks source link

[Suggestion] Find New Procedure Location > After current procedure #123

Closed fvet closed 3 years ago

fvet commented 3 years ago

When refactoring functions (split in atomic / helper functions), I often want my new functions to be close to it's parent function. It would be nice if we could either have a new 'Find New Procedure Location' option 'After current procedure' (only applies for refactored code in procedures, make no real sense for refactoring table / field / page trigger code)

Alternative might be to add the current procedure (if any) as the first available option in the list when you would use 'Always Ask'.?

image

DavidFeldhoff commented 3 years ago

Hi Frédéric, I think I get your point thanks for reaching out. But what should happen differently if I add a procedure inside or extract some code out of a table field trigger? Should it be added by type, access modifier and name/range? That would be quite implicit and intransparent which I generally do not like, but I don't like the alternative either that it would be added as first procedure, just because it's the nearest position to the table field. Maybe your alternative solution with the "always ask" option is therefore more straight forward and transparent..

fvet commented 3 years ago

Most transparent (covering both scenarios) would be indeed extending the 'Alwask Ask' option by adding the current procedure (when applicable) as the first in the list (maybe suffix with (Current)), so we can simply confirm the new procedure location with Enter.

DavidFeldhoff commented 3 years ago

This is also included in the last release v1.0.7. I hope it solves your requirements?

jwikman commented 2 years ago

This is also included in the last release v1.0.7. I hope it solves your requirements?

Well done @DavidFeldhoff! I was just about to report a feature suggestion about this, luckely I used the search function first. This fulfilled my request, thanks!

DavidFeldhoff commented 2 years ago

Thanks for the feedback and I'm glad it fulfills your requirements 😊 often the positive feedback comes a bit short, so thanks for that 👌🏻

fvet commented 2 years ago

image