1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-30 21:55:31 +02:00

Bug 342524: Toggle Refactoring: Create user documentation

https://bugs.eclipse.org/bugs/show_bug.cgi?id=342524
This commit is contained in:
Emanuel Graf 2011-04-14 08:20:42 +00:00
parent 536ce267ee
commit 32897bacd5
8 changed files with 89 additions and 19 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -35,6 +35,8 @@
<img src="../images/trans.gif" width="50" height="1" alt=""><a style="text-decoration:none" href="cdt_t_shift_code.htm">Shifting lines of code to the right or left</a><br>
<img src="../images/trans.gif" width="50" height="1" alt=""><a style="text-decoration:none" href="cdt_t_open_declarations.htm">Navigating to C/C++ declarations</a><br>
<img src="../images/trans.gif" width="50" height="1" alt=""><a style="text-decoration:none" href="cdt_t_refactoring.htm">Refactoring</a><br>
<img src="../images/trans.gif" width="75" height="1" alt=""><a style="text-decoration:none" href="cdt_t_rename.htm">Rename</a><br>
<img src="../images/trans.gif" width="75" height="1" alt=""><a style="text-decoration:none" href="cdt_t_toggle.htm">Toggle Function Definition</a><br>
<img src="../images/trans.gif" width="25" height="1" alt=""><a style="text-decoration:none" href="cdt_o_build_task.htm">Building projects</a><br>
<img src="../images/trans.gif" width="50" height="1" alt=""><a style="text-decoration:none" href="cdt_t_proj_rename.htm">Renaming a project</a><br>
<img src="../images/trans.gif" width="50" height="1" alt=""><a style="text-decoration:none" href="../reference/cdt_u_prop_general_pns_ref.htm">Selecting referenced projects</a><br>

View file

@ -23,7 +23,8 @@
<img src="../images/trans.gif" width="25" height="1" alt=""><a style="text-decoration:none" href="cdt_t_sel_search.htm">Selection Searching for C/C++ elements</a><br>
<img src="../images/trans.gif" width="25" height="1" alt=""><a style="text-decoration:none" href="cdt_t_open_declarations.htm">Navigating to C/C++ declarations</a><br>
<img src="../images/trans.gif" width="25" height="1" alt=""><a style="text-decoration:none" href="cdt_t_refactoring.htm">Refactoring</a><br>
<img src="../images/trans.gif" width="50" height="1" alt=""><a style="text-decoration:none" href="cdt_t_rename.htm">Rename</a><br>
<img src="../images/trans.gif" width="50" height="1" alt=""><a style="text-decoration:none" href="cdt_t_toggle.htm">Toggle Function Definition</a><br>
<p><img src="../images/ng00_04a.gif" ALT="QNX Copyright Statement" ></p>
</body>

View file

@ -12,25 +12,12 @@
<h1 role="main">Refactoring</h1>
<p>Use the C/C++ Projects, Outline, or the Editor view <strong>Refactor &gt; Rename</strong> context menu to refactor class &amp; type names, methods, function &amp; member names.</p>
<p>The following topics provide information about refactoring:</p>
<img src="../images/trans.gif" width="25" height="1" alt=""><a style="text-decoration:none" href="cdt_t_rename.htm">Rename Refactoring</a><br>
<img src="../images/trans.gif" width="25" height="1" alt=""><a style="text-decoration:none" href="cdt_t_toggle.htm">Toggle Function Refactoring</a><br>
<p>To refactor an object select the object, right click and select <strong>Refactor &gt; Rename...</strong></p>
<p> <img src="../images/cdt_refactor.png" alt="Editor View showing Refactor option" ></p>
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 <strong>Refactor &gt; Undo</strong></p>
<p> <img src="../images/cdt_refactor_undo.png" alt="Editor View showing Refactor Undo option" ></p>
<p><img src="../images/ngconcepts.gif" ALT="Related concepts" width="143" height="21">
<br>
<a href="../concepts/cdt_c_open_declarations.htm">Open Declaration</a><br>
<a href="../concepts/cdt_c_projects.htm">CDT Projects</a><br>
<a href="../concepts/cdt_c_search.htm">C/C++ search</a></p>
<p><img src="../images/ngtasks.gif" ALT="Related tasks" width="143" height="21">
<br>
<a href="cdt_t_search.htm">Searching for C/C++ elements</a></p>
<p><img src="../images/ngref.gif" ALT="Related reference" width="143" height="21">
<br>
<a href="../reference/cdt_u_search.htm">C/C++ search page, Search dialog box</a></p>
<p>
<img src="../images/ng00_07.gif" ALT="IBM Copyright Statement" >

View file

@ -0,0 +1,39 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Rename Refactoring</title>
<link rel="stylesheet" type="text/css" href="../help.css">
</head>
<body>
<h1 role="main">Rename Refactoring</h1>
<p>Use the C/C++ Projects, Outline, or the Editor view <strong>Refactor &gt; Rename</strong> context menu to refactor class &amp; type names, methods, function &amp; member names.</p>
<p>To refactor an object select the object, right click and select <strong>Refactor &gt; Rename...</strong></p>
<p> <img src="../images/cdt_refactor.png" alt="Editor View showing Refactor option" ></p>
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 <strong>Refactor &gt; Undo</strong></p>
<p> <img src="../images/cdt_refactor_undo.png" alt="Editor View showing Refactor Undo option" ></p>
<p><img src="../images/ngconcepts.gif" ALT="Related concepts" width="143" height="21">
<br>
<a href="../concepts/cdt_c_open_declarations.htm">Open Declaration</a><br>
<a href="../concepts/cdt_c_projects.htm">CDT Projects</a><br>
<a href="../concepts/cdt_c_search.htm">C/C++ search</a></p>
<p><img src="../images/ngtasks.gif" ALT="Related tasks" width="143" height="21">
<br>
<a href="cdt_t_search.htm">Searching for C/C++ elements</a></p>
<p><img src="../images/ngref.gif" ALT="Related reference" width="143" height="21">
<br>
<a href="../reference/cdt_u_search.htm">C/C++ search page, Search dialog box</a></p>
<img src="../images/ng00_07.gif" ALT="IBM Copyright Statement" >
</body>
</html>

View file

@ -0,0 +1,36 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Toggle Function Definition Refactoring</title>
<link rel="stylesheet" type="text/css" href="../help.css">
</head>
<body>
<h1 role="main">Toggle Function Definition</h1>
<p>Toggle Function Definition moves a function definition inside an Eclipse CDT source editor from one
position to another and preserves correctness.</p>
<p>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.</p>
<p><img alt="Selection" src="../images/cdt_t_toggle_selection.png" title="Valid selection region"><br/>Valid selection region</p>
<h2>Toggle free functions</h2>
<p>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.</p>
<h2>Toggle member functions</h2>
<p>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.</p>
<p><img alt="Toggle Member Function Definition" src="../images/cdt_t_toggle_member.png"></p>
<img src="../images/ng00_07.gif" ALT="IBM Copyright Statement" >
</body>
</html>

View file

@ -25,7 +25,12 @@
</topic>
<topic label="Shift lines of code to the left or right" href="tasks/cdt_t_shift_code.htm"/>
<topic label="Navigate to C/C++ declarations by name" href="tasks/cdt_t_open_declarations.htm"/>
<topic label="Refactoring" href="tasks/cdt_t_refactoring.htm"/>
<topic href="tasks/cdt_t_refactoring.htm" label="Refactoring">
<topic href="tasks/cdt_t_rename.htm" label="Rename">
</topic>
<topic href="tasks/cdt_t_toggle.htm" label="Toggle Function Definition">
</topic>
</topic>
</topic>
<topic label="Building projects" href="tasks/cdt_o_build_task.htm">
<topic label="Renaming a project" href="tasks/cdt_t_proj_rename.htm"/>