core/com.nokia.carbide.cpp.doc.user/html/tasks/custom/carb_custom_styles.htm
author fturovic <frank.turovich@nokia.com>
Wed, 06 Oct 2010 10:31:32 -0500
changeset 2131 ff0156b93599
parent 1794 70a35950a2e8
permissions -rw-r--r--
moved inf, mmp, remote conn, and views to project folder

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="LASTUPDATED" content="06/17/05 11:09:43" />
<title>Customizing Carbide: Code Styles</title>
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
<link rel="StyleSheet" href="../../../book.css" type="text/css"/>
</head>
<body >
<h2>Customizing Carbide: Code Styles</h2>
<p> You can customize how your source files are automatically formatted by using code styles. Code styles include items like indentation, use of braces or bracketts, whitespace, tab usages, and much more. In addition to supporting a variety of predefined code styles you can also create your own. </p>
<p>The change or customize a code style, open the <img src="../../images/command_link.png" border="0" alt="" /> <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=
org.eclipse.cdt.internal.ui.preferences.CodeFormatterPreferencePage)")'> Code Style</a> preference panel.</p>
<p align="center"><img src="../images/pref_code_style_differences.png" alt="Code Style differences" width="600" height="429"></p>
<p>The predefined code styles include:</p>
<ul>
    <li><strong>BSD/Allman</strong> (<em>Eclipse</em>) &ndash; Based on the code style used for the ANSI C standard.</li>
    <li><strong>GNU</strong> (<em>Eclipse</em>) &ndash; Based on the code style used in for the GNU Coding Standards used by the GNU project.</li>
    <li><strong>K&amp;R</strong> (<em>Eclipse</em>) &ndash; Based on the code style used in <em>The C Programming Language</em> by Kernighan and Ritchie.</li>
    <li><strong>S60</strong> &ndash; Based on the code style used in Nokia S60 source code examples.</li>
    <li><strong>Symbian</strong> (<em>default</em>) &ndash; Based on the code style used in Symbian source code examples.</li>
    <li><strong>Qt</strong> &ndash; Based on the code style used in the Qt source code examples.</li>
    <li><strong>Whitesmiths</strong> (<em>Eclipse</em>) &ndash; Based on the code style used in documentation for the first commercial C compiler, the Whitesmith's Compiler.</li>
</ul>
<h4>Other references</h4>
<ul>
    <li><a href="carb_customizing.htm">Customizing Carbide</a></li>
    <li><a href="http://en.wikipedia.org/wiki/Indent_style#K.26R_style">Indent style</a> (Wikipedia)</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>