core/com.nokia.carbide.cpp.doc.user/html/tasks/code_style_reformatting_sources.htm
author dan.podwall@nokia.com
Mon, 06 Apr 2009 14:56:28 -0500
changeset 56 887bd61e1328
parent 2 d760517a8095
child 1225 a546534a48de
permissions -rw-r--r--
merge from RCL_2_0 to default

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head>
<title>Reformatting a Source File</title>
<link rel="StyleSheet" href="../../book.css" type="text/css"/>
</head>
   <body>
<h2>Reformatting a Source File</h2>

	  
	 <p>You can reformat a source file to use any of the  preset code styles  in the <img src="../images/command_link.png" alt="" width="16" height="12" border="0" /> <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.cdt.ui.preferences.CodeFormatterPreferencePage)")'> Code Style</a> preference panel.  </p>
	 <div class="step">
	   <h4>To reformat a source file</h4>
	   <ol>
	     <li>Verify the correct code style is set in the <a href="../reference/wnd_pref_code_style.htm">Code Style</a> preference panel </li>
         <li>Open an editor view with the source file you want to reformat</li>
	     <li>Right-click and choose <b>Source &gt; Format</b> (<span class="code">CTRL+SHIFT+F</span>)</li>
	   </ol>
       <p align="center"><img src="images/menu_reformat_source_file.png" width="444" height="431" /></p>
       <p align="center" class="figure">Figure 1 -Selecting Source &gt; Format from an editor view </p>
   </div>
	 <h5>Related references	 </h5>
	 <ul>
       <li><a href="PLUGINS_ROOT/org.eclipse.cdt.doc.user/reference/cdt_u_c_code_style_pref.htm">Code Style preferences</a></li>
       <li><a href="code_style_workspace.htm">Setting the Workspace Code Style </a></li>
   </ul>
	 <div id="footer">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. <br>License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></div>

   </body>
   </html>