diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt_inline_rename.png b/doc/org.eclipse.cdt.doc.user/images/cdt_inline_rename.png new file mode 100755 index 00000000000..44047e88db8 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt_inline_rename.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt_refactor.png b/doc/org.eclipse.cdt.doc.user/images/cdt_refactor.png index 14897549720..22a4375c9ca 100644 Binary files a/doc/org.eclipse.cdt.doc.user/images/cdt_refactor.png and b/doc/org.eclipse.cdt.doc.user/images/cdt_refactor.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt_rename_dialog.png b/doc/org.eclipse.cdt.doc.user/images/cdt_rename_dialog.png new file mode 100755 index 00000000000..4be0a7d5ff5 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt_rename_dialog.png differ diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_rename.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_rename.htm old mode 100644 new mode 100755 index adbc2c21532..2f96212125a --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_rename.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_rename.htm @@ -1,39 +1,55 @@ - Rename Refactoring - - -

Rename Refactoring

- -

Use the C/C++ Projects, Outline, or the Editor view Refactor > Rename context menu to refactor class & type names, methods, function & member names.

- -

To refactor an object select the object, right click and select Refactor > Rename...

-

Editor View showing Refactor option

- - The refactoring engine will rename all instances of the object in all referenced files. You can Undo refactoring by right clicking a second time and selecting Refactor > Undo

-

Editor View showing Refactor Undo option

- -

Related concepts -
-Open Declaration
-CDT Projects
-C/C++ search

-

Related tasks -
-Searching for C/C++ elements

-

Related reference -
-C/C++ search page, Search dialog box

- -IBM Copyright Statement - -
- +
+

Rename Refactoring

+

+ Use the Refactor > Rename command to rename + variables, functions, classes, methods, fields or typedefs. +

+

+ In an Editor window, select an item and run Refactor + > Rename... from the context menu. +

+

+ Example of inline renaming. +

+

All uses of the name are highlighted, and updated in real time + as you type. If you want to view the preview, or change any options, + simply click on the triangle, or press the keyboard shortcut again. + Otherwise, the options are the same as the last time a rename + refactoring was done.

+

When you hit Enter, all the item's declarations, definitions + and references will be changed to use the new name. The standard Undo + command can be used to revert the changes, if necessary.

+

The options can be set using a dialog box, where you can + specify the new name, and set various options affecting how hard to + look for uses of the name that should be updated. From there you can + also view the Preview of the changes that will be made by the + refactoring.

+

+ Rename dialog box +

+

Items to be renamed can also be selected from the Project + Explorer window, although inline renaming is not available in this + case, so the dialog box comes up immediately.

+

+ Project Explorer context menu Refactor > Rename command +

+

+ Related reference
Refactor Menu actions +

+ IBM Copyright Statement +
+