diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt_t_toggle_member.png b/doc/org.eclipse.cdt.doc.user/images/cdt_t_toggle_member.png new file mode 100644 index 00000000000..7c594e1600f Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt_t_toggle_member.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt_t_toggle_selection.png b/doc/org.eclipse.cdt.doc.user/images/cdt_t_toggle_selection.png new file mode 100644 index 00000000000..5b1c394d3c3 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt_t_toggle_selection.png differ diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_tasks.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_tasks.htm index 3a65262ea3d..e2396de0c7a 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_tasks.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_tasks.htm @@ -35,6 +35,8 @@ Shifting lines of code to the right or left
Navigating to C/C++ declarations
Refactoring
+ Rename
+ Toggle Function Definition
Building projects
Renaming a project
Selecting referenced projects
diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_write_code.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_write_code.htm index 2068fcef1df..79c57a06b5b 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_write_code.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_write_code.htm @@ -23,7 +23,8 @@ Selection Searching for C/C++ elements
Navigating to C/C++ declarations
Refactoring
- + Rename
+ Toggle Function Definition

QNX Copyright Statement

diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_refactoring.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_refactoring.htm index f8f533597ef..a5bc99f99a3 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_refactoring.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_refactoring.htm @@ -12,25 +12,12 @@

Refactoring

-

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

+

The following topics provide information about refactoring:

+ Rename Refactoring
+ Toggle Function Refactoring
-

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 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 new file mode 100644 index 00000000000..691011d8b52 --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_rename.htm @@ -0,0 +1,39 @@ + + + + + + +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 + + + + diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_toggle.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_toggle.htm new file mode 100644 index 00000000000..2b2434f57e2 --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_toggle.htm @@ -0,0 +1,36 @@ + + + + + + +Toggle Function Definition Refactoring + + + + + +

Toggle Function Definition

+ +

Toggle Function Definition moves a function definition inside an Eclipse CDT source editor from one +position to another and preserves correctness.

+ +

Toggling is available whenever the cursor is inside a function declaration +or definition. Any selection between the first and the last character of +the function definition (without comments) is considered valid for toggling.

+

Selection
Valid selection region

+ +

Toggle free functions

+

The refactoring moves free functions from an implementation file to a header file with the same name and back. + If the header file does not exist the file is created.

+ +

Toggle member functions

+

The function definition of a member function can by moved from the class declaration in the header file to an inline definition + in the header file to the implementation file and back to the class definition.

+

Toggle Member Function Definition

+ +IBM Copyright Statement + + + + diff --git a/doc/org.eclipse.cdt.doc.user/topics_Tasks.xml b/doc/org.eclipse.cdt.doc.user/topics_Tasks.xml index 5ebe2782b86..b7a411204ce 100644 --- a/doc/org.eclipse.cdt.doc.user/topics_Tasks.xml +++ b/doc/org.eclipse.cdt.doc.user/topics_Tasks.xml @@ -25,7 +25,12 @@ - + + + + + +