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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head>
<title>Code Styles preferences</title>
<link rel="StyleSheet" href="../../book.css" type="text/css"/>
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
</head>
   <body>
<h2>Code Styles preferences</h2>

	  
	 <p>Carbide supports the use of code styles in projects via the C/C++  <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. Use a code style profile to set specific smart typing features, like indentation, tabs or spaces, and many more options. There are several built-in code styles like GNU, Whitesmith, and others, while Carbide supplies these  additional styles:</p>
	 <ul>
	   <li><b>Symbian</b> &#8212; settings are based on the <a href="http://developer.symbian.com/main/downloads/papers/coding_stds/2003-01_SyOSCodStn.pdf">Symbian C++ coding standards</a></li>
	   <li><b>S60</b> &#8212; settings are based on the <strong>C++ Developer's Library &gt; </strong><a href="http://library.forum.nokia.com/index.jsp?topic=/Nokia_Symbian3_Developers_Library/GUID-B51A9A1F-8E80-4DF6-904A-7BD1A8976BBB.html">C++ Coding Conventions</a></li>
       <li><strong>Qt</strong> &mdash; settings for Qt projects</li>
   </ul>
   <p>Setting a code style sets it for the entire workspace. When a new file is created the currently selected code style rules are applied as you edit the file. You can apply a set of rules to a previously created source file by opening it in an editor view, then right-clicking and choosing <b>Source &gt; Format</b> (<span class="code">CTRL+SHIFT+F</span>). </p>
	 <p align="center"><img src="images/wnd_pref_code_styles.png" width="658" height="562" /></p>
   <p align="center" class="figure">Figure 1 - Code Style preference panel </p>
	 <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="../tasks/code_style_workspace.htm">Setting the Workspace Code Style</a> </li>
       <li><a href="../tasks/code_style_reformatting_sources.htm">Reformatting a Source File</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>