Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Lazarus Lazarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,108
    • Issues 2,108
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 9
    • Merge requests 9
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • LazarusLazarus
  • LazarusLazarus
  • Issues
  • #24298
Closed
Open
Created Apr 19, 2013 by FPC Admin account@fpc_adminOwner

Refactoring does not include paramaters variables in new extracted method

Original Reporter info from Mantis: motaz
  • Reporter name: Motaz Abdel Azeem

Description:

When extracting a method from a procedure, the newly extracted method will not contain the parameters that exist in origional procedure, only local variables are included

Steps to reproduce:

Write this sample procedure:

procedure DoSomething(List: TStringList);
var
  i: Integer;
begin
  Writeln('First');

  // Refactor this
  for i:= 0 to List.Count do
  if List.IndexOf('-') > 0 then
    writeln('Seperator');
  // End of refactor

  Writeln('Last');

end;

After refactoring you will get this new procedure:

procedure NewProc;
var
  i: Integer;
begin
  // Refactor this
  for i:= 0 to List.Count do
  if List.IndexOf('-') > 0 then
    writeln('Seperator');
  // End of refactor
end;  

Note that List is not included in NewProc parameters

Mantis conversion info:

  • Mantis ID: 24298
  • OS: Linux
  • OS Build: Ubuntu 12.04
  • Build: 40849
  • Platform: all
  • Version: 1.0.9 (SVN)
Assignee
Assign to
Time tracking