1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 01:15:29 +02:00

Bug 400226: updated Toggle Function Definition docs

Change-Id: Ie7c579d40e64ea8e0c4d6e7354db8a12c480f964
Reviewed-on: https://git.eclipse.org/r/10405
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
This commit is contained in:
Jesse Weinstein 2013-02-15 21:19:13 -05:00 committed by Sergey Prigogin
parent c5f65f3722
commit 9b764dddbd
5 changed files with 33 additions and 26 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

59
doc/org.eclipse.cdt.doc.user/tasks/cdt_t_toggle.htm Normal file → Executable file
View file

@ -1,36 +1,43 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en"> <html lang="en">
<head> <head>
<meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Toggle Function Definition Refactoring</title> <title>Toggle Function Definition Refactoring</title>
<link rel="stylesheet" type="text/css" href="../help.css"> <link rel="stylesheet" type="text/css" href="../help.css">
</head> </head>
<body> <body>
<div role="main">
<div role="main"><h1>Toggle Function Definition</h1> <h1>Toggle Function Definition</h1>
<p>
<p>Toggle Function Definition moves a function definition inside an C/C++ source editor from one Use the <strong>Refactor &gt; Toggle Function Definition</strong>
position to another and preserves correctness.</p> command to toggle the location where a function is defined.
</p>
<p>Toggling is available whenever the cursor is inside a function declaration <p>
or definition. Any selection between the first and the last character of In an Editor window, place the cursor inside a function declaration
the function definition (without comments) is considered valid for toggling.</p> or definition, then run <strong>Refactor &gt; Toggle
<p><img alt="Selection" src="../images/cdt_t_toggle_selection.png" title="Valid selection region"><br/>Valid selection region</p> Function Definition</strong> from the context menu. Any cursor position
between the first and the last characters of the function definition
<h2>Toggle free functions</h2> (but not including comments preceding the function) will cause that
<p>The refactoring moves free functions from an implementation file to a header file with the same name and back. function to be selected for the refactoring.
If the header file does not exist the file is created.</p> </p>
<p>
<h2>Toggle member functions</h2> <img alt="" src="../images/cdt_t_toggle_selection.png">
<p>The function definition of a member function can by moved from the class declaration in the header file to an inline definition </p>
in the header file to the implementation file and back to the class definition.</p> <p>This refactoring switches a function definition from a header
<p><img alt="Toggle Member Function Definition" src="../images/cdt_t_toggle_member.png"></p> file to a correspondingly-named implementation file. If the necessary
file does not exist, it will be created (after a confirmation
<img src="../images/ng00_07.gif" ALT="IBM Copyright Statement" > dialog).</p>
<p>
</div></body> <img alt="" src="../images/cdt_t_toggle_selection2.png">
</p>
<p>For methods, it can also switch the method from being defined
within its parent class declaration to being defined using an inline
definition in the same header file.</p>
<p>
<img alt="" src="../images/cdt_t_toggle_selection3.png">
</p>
<img src="../images/ng00_07.gif" ALT="IBM Copyright Statement">
</div>
</body>
</html> </html>