Coder Social home page Coder Social logo

Comments (9)

DavidFeldhoff avatar DavidFeldhoff commented on June 13, 2024 1

Hi Jeremy, thanks for your idea. I'm currently on vacation and as it's pretty tricky to code while hiking, I can't make it this week :)
I'll come back to you if I find some time.
Best,
David

from al-codeactions.

DavidFeldhoff avatar DavidFeldhoff commented on June 13, 2024 1

Hi Jeremy, I added a new functionality for that. I'll release it shortly :)
Here you can already see how it'll look like.
Any suggestions?
https://github.com/DavidFeldhoff/al-codeactions/blob/develop/images/RefactorValidate.gif

from al-codeactions.

JeremyVyska avatar JeremyVyska commented on June 13, 2024 1

Precisely.

So, given these lines, you select all three:

SomethingJournal."Posting Date" := newDate;
SomethingJournal."Document No." := newDocNo;
SomethingJournal."Amount" := newAmount;

And after one CodeAction, that selection becomes:

SomethingJournal.Validate("Posting Date",newDate);
SomethingJournal.Validate("Document No.",newDocNo);
SomethingJournal.Validate("Amount",newAmount);

from al-codeactions.

DavidFeldhoff avatar DavidFeldhoff commented on June 13, 2024 1

I just released it. Feel free to test it and close the issue afterwards :)

from al-codeactions.

JeremyVyska avatar JeremyVyska commented on June 13, 2024

I love it lots! That's marvelous.

Is it possible to expand, just as it is, to be able to select a region of code, say 5 (or even 20 for the crazy) lines of field assignments, and then have the same CodeAction apply to each of 5 the 5 lines?

from al-codeactions.

DavidFeldhoff avatar DavidFeldhoff commented on June 13, 2024

Don't know exactly what you mean :)
So yes, if there are 20 lines directly underneath, you just have to select all of them and execute the codeAction just once. Is that what you're asking for?

from al-codeactions.

DavidFeldhoff avatar DavidFeldhoff commented on June 13, 2024

That'll work :)

from al-codeactions.

rihlsul avatar rihlsul commented on June 13, 2024

Super good. Though I lack permissions in GitHub's Issues to Close this.

from al-codeactions.

DavidFeldhoff avatar DavidFeldhoff commented on June 13, 2024

Glad to hear !

from al-codeactions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.