Renames identifiers and all references to the target identifier. You can rename an identifier if the original declaration identifier is in your project or in a project your project depends on, in the Project Group. You can also rename an identifier if it is an error identifier, for instance, an undeclared identifier or type.
The refactoring engine enforces a few renaming rules:
Renaming a method, type, and other objects is functionally the same as renaming an identifier. If you select a procedure name in the Code Editor, you can rename it. If the procedure is overloaded, the refactoring engine renames only the overloaded procedure and only calls to the overloaded procedure. An example of this rule follows:
procedure Foo; overload; procedure Foo(A:Integer); overload; Foo(); Foo; Foo(5);
If you rename the first procedure Foo in the preceding code block, the engine renames the first, third, and fourth items.
If you rename an overridden identifier, the engine renames all of the base declarations and descendent declarations, which means the original virtual identifier and all overridden symbols that exist. An example of this rule follows:
TFoo = class procedure Foo; virtual; end; TFoo2 = class(TFoo) procedure Foo; override; end; TFoo3 = class(TFoo) procedure Foo; override; end; TFoo4 = class(TFoo3) procedure Foo; override; end;
Performing a rename operation on Foo renames all instances of Foo shown in the preceding code sample.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|