DavidFeldhoff / al-codeactions

MIT License
17 stars 8 forks source link

Extract to procedure: Rename not possible if variables are moved #95

Closed NKarolak closed 3 years ago

NKarolak commented 3 years ago

If you extract lines of code without a variable to be moved to a procedure, you can rename the new procedure directly: E2P_1

However, if you include a variable that will be moved, you cannot rename the procedure anymore within the same step. As you can see, newProcedure is missing within the entry page: E2P_2 So, whenever a variable would be moved, you actively need to go to the newProcedure call and rename it with F2.

Code:

local procedure TestFunction();
    var
        i: integer;
    begin
        if true then begin
            // i := 1;
        end;
    end;
DavidFeldhoff commented 3 years ago

Hi Natalie, thanks for the hint! I'll fix it tomorrow. Related to #92

DavidFeldhoff commented 3 years ago

Hi Natalie, I just fixed this one in release 0.2.21. Thanks for not getting tired of reporting :)

NKarolak commented 3 years ago

Thank you for not getting tired of fixing and still staying friendly ;-)