Show: Object Pascal C++
Display Preferences

Change Parameters Overview (Object Pascal)

From Appmethod Topics
Jump to: navigation, search

Go Up to Refactoring Applications Index

Adding or removing a parameter from a procedure or function is a commonly performed and tedious programming task. Appmethod provides the Change Parameters refactoring to automate this task. You can use Change Parameters to add, remove, and rearrange procedure or function parameters.

To use this refactoring, select a procedure or function name in the Code Editor and choose Refactor > Change Params.

When you use the Change Parameters refactoring, the following procedure or function signature conflicts can occur:

  • A descendent class contains an override for the method you are refactoring. When you refactor the method, any methods that override the refactored method will also be refactored.
  • A descendent class contains an overloaded version of the method that has the same signature as the refactored version. When you refactor the method, the overload is changed to an override.
  • A descendent class has an overridden method that matches the original signature. When you refactor the method, the override is changed to an overload.
Note: If you remove a parameter, you need to manually remove any method code that uses the removed parameter.
Note: In Object Pascal, you can apply the Change Parameters operation to generic methods.

See Also

Personal tools
In other languages