core/com.nokia.carbide.cpp.doc.user/html/tasks/code_style_reformatting_sources.htm
author stechong
Wed, 20 Oct 2010 11:19:31 -0500
changeset 2165 2a7b5eccb0bc
parent 1658 2a5c0df13bad
permissions -rw-r--r--
Keeping PlatSim internal only.

<!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/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="604" height="258" /></p>
       <p align="center" class="figure">Figure 1 -Selecting Source &gt; Format from within 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; 2010 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>