core/com.nokia.carbide.cpp.doc.user/html/reference/indexer.html
author fturovic <frank.turovich@nokia.com>
Tue, 21 Sep 2010 15:50:51 -0500
changeset 2087 617a89f9dffc
parent 1658 2a5c0df13bad
child 2131 ff0156b93599
permissions -rw-r--r--
BUG 12110 - text instances of apptrk/systrk changed, more images yet to update

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head>
<title>Indexer</title>
<link rel="StyleSheet" href="../../book.css" type="text/css"/>
</head>
   <body>
<h2>Indexer</h2>
<p>The C/C++ <b>Indexer</b> uses the parser to create a database of  source and header files that provide the basis for C/C++ search, navigation features and content assist. The goal of indexing is to record all named elements in a project's source code and store them with their related data. The indexer parses each source file in your project and updates related indexes. By indexing your files with the indexer, useful features such as code completion and fast file search can be used. It is also possible to specify different indexer settings for each project in your workspace.</p>
   <p>If you choose to perform the <b>Full C/C++ Indexer </b>option the indexer will consume the CPU for some time, but you will gain more benefit from the process after it completes.
    However, if you do not require the benefits of indexing your project, select the <b>No Indexer</b> option to speed up the process of building your project.</p>
   <p>The indexer runs on a background thread and reacts to resource change events such as:</p>
   <ul>
     <li>C/C++ project creation/deletion</li>
     <li>Source files creation/deletion</li>
     <li>File imports</li>
     <li> Source file content changes</li>
   </ul>
   <p>The global <b>Indexer</b> is accessed by selecting <b>Window &gt; Preferences &gt; C/C++ &gt; Indexer</b> (figure 1). The sections outlined in red appear as part of the project level indexer.</p>
   <p class="note"><b>NOTE</b> You can also rebuild a project's index by selecting a project, then right-click  and select the <b>Rebuild Index</b> menu item. </p>
   <p align="center" class="Image"><img src="images/pref_indexer.png" alt="Indexer preference panel" width="680" height="775"></p>
   <p align="left" class="figure">Figure 1 - C/C++ Indexer  in Preferences</p>
   <p align="left" class="Image">The project  indexer is accessed by selecting a project in the <a href="view_proj_explorer.htm">Project Explorer</a> or <a href="view_sym_proj_nav.htm">Symbian Project Navigator</a> view and selecting <b>Project &gt; Properties &gt; C/C++ General &gt; Indexer</b> (figure 2).</p>
   <p align="center" class="Image"><img src="images/pref_indexer_properties.png" alt="Indexer properties panel" width="680" height="628"></p>
   <p align="left" class="figure">Figure 2 - Indexer panel in  Properties for project_name</p>
   <table cellpadding="2" cellspacing="0"
border="0">
	 <tr valign="top"><th width="221" class="Cell">Name</th><th width="558" class="Cell">Function</th></tr>
         <tr valign="top">
           <td class="Cell"><b>Select indexer </b></td>
           <td class="Cell"><p>Dropdown list of available index options.</p>
             <ul>
               <li>Fast C/C++ Indexer - Source files will be indexed and eat up a lot of CPU time and memory during the first generation of the indexer. This can take some time depending on the size of your project. Afterwards the indexer will only reindex the relevant parts you changed in your code and not the whole source tree.</li>
               <li>Full C/C++ Indexer - Performs a complete parse of all source files and takes up the most amount of time to complete.</li>
               <li>No Indexer - Project source files are not indexed, therefore search features will not work accurately and code completion will not be available.</li>
           </ul></td>
        </tr>
         <tr valign="top">
           <td class="Cell"><b>Apply indexer to all projects now </b></td>
           <td class="Cell">Select this option to apply the Fast C/C++ Indexer option to all projects in your current workspace. </td>
        </tr>
         <tr valign="top">
           <td class="Cell"><b>Rebuild the index when changing to a different build configuration </b></td>
           <td class="Cell">Select this option to rescan and index the source files for the current project when you change the active build configuration. The index will be built based on the active build configuration. All macros and header files used to build the index will be taken from the active build configuration.</td>
         </tr>
         <tr valign="top">
           <td class="Cell"><p><b>Build the index only for the build configuration specified in the project's indexer settings</b></p>
           <p>&nbsp;</p>
           <p><b>Build the index only for the specified build configuration </b></p></td>
           <td class="Cell"><p>The indexer will only be run for the build configuration specified in the Indexer panel in the project's property settings. All macros and header files used to build the index will be taken from the specified configuration.</p>
           <p>&nbsp;</p>
           <p class="note"><b>NOTE</b> This option appears in the project properties indexer panel. A dropdown list is provided to select a build configuration for the currently selected project.</p></td>
         </tr>
   </table>
	 <p>&nbsp;</p>
	 <h5>Related concepts</h5>
	 <ul>
       <li><a href="../concepts/build_configurations.htm">Active Build Configuration</a></li>
  </ul>
	 <h5>Related tasks     </h5>
	 <ul><li><a href="../tasks/projects/prj_set_build_tgt.htm">Setting Active Build Configurations</a></li>
       <li><a href="../tasks/projects/prj_debug_config.htm">Creating Launch Configurations</a></li>
	   <li><a href="../tasks/projects/prj_new_build_config.htm">Creating Build Configurations</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>