The JADE 2022 release meets tomorrow’s business demands.
The current behavior when using the Right Click > Refactor > Extract method is as follows:
exampleMethod();
vars
variable : Boolean;
begin
variable := true;
end;
Then I highlight the variable := true; line and Right Click > Refactor > Extract Method I get:
newMethod(variable : Boolean io);
vars
begin
variable := true;
end;
It would be great if the refactor process could automatically identify that 'variable' was only used in the block of code selected for refactor and instead make it a local variable instead of a IO parameter, like this:
newMethod();
vars
variable : Boolean;
begin
variable := true;
end;
It's very easy to change it in the window which pops up for this contrived example, but when there is a lot of local variables being swapped to IO parameters it can be a pain to fix up each time.