Sharing Parse Results of a Large C/C++ Project
Contributed by Vladimir Kvashin, maintained by Alyona Stashkova
October 2013 [Revision number: V7.4-1]
This document describes how to do parsing of a large project once and then share results with your team members to save time and resources.
To follow this tutorial, you need the following software.
See the NetBeans IDE
Installation Instructions and
Configuring the NetBeans IDE for C/C++/Fortran for information about downloading and installing the required software.
Code Assistance Cache
The NetBeans IDE stores parse results on a disk when parsing C/C++ source code. The saved data on a disk is called Code Assistance Cache.
When you open a project, the NetBeans IDE examines the cache and checks whether the latter is up to date. If the cache is up to date, the NetBeans IDE does not parse your project and just loads the required data for code navigation from the Code Assistance Cache.
Sharing Code Assistance Cache
By default the Code Assistance Cache resides in the
stands for the NetBeans user directory)
and can be neither shared nor copied to another location.
If the Code Assistance Cache is placed inside a project, it can be copied to another machine, provided that the machine it is copied to meets the following requirements:
- the operating system is identical to the operating system on the machine where the code was parsed on
- the tool collection used by the project exists on the machine the cache is copied to and resides in the same location
To instruct the NetBeans IDE to place the Code Assistance Cache inside your project metadata:
- Add the
cache.location=nbproject/private/cache line to either:
- the project properties file (
the private properties file (
Note: The difference between the project properties and private properties files is that the public one (
nbproject/project.properties) is shared via version control system by default, while the private one (
is not. So if you modify private properties, you will need to synchronize the private properties file with the identical file on another machine.
If a project properties file is modified, a version control system can automatically synchronize it with the one on another machine for you.
- After the properties file is modified, close and reopen the project.
The IDE will parse the project and the Code Assistance Cache
will be placed into a private subdirectory in the project metadata.
Close the project and archive your
or copy it to a shared location.
Note: Do not forget to close a project before copying or zipping,
otherwise some data will not be flushed to cache.
The Code Assistance Cache can now be copied to other projects on other machines
and be used. instead of waiting until NetBeans parses the project.
If there are some newer files on the machine the cache is being copied to,
only newer files are going to be parsed.
Sharing Cache between Machines with Different Operating Systems or Compilers
If the Code Assistance Cache needs to be shared between machines that run different operating systems or different compilers,
you must create separate cache for each pair (Operating System, Compiler Collection).
More Information about C/C++/Fortran Support
Please visit the C/C++ Learning Trail for more information about using the C/C++ features of the NetBeans IDE.
Join the NetBeans C/C++ User Forum to take part in discussions related to C/C++ development using the NetBeans IDE or ask for help.
You can file a bug or suggest an enhancement to Bugzilla (netbeans.org registration is required).