Go to main content
Oracle® Developer Studio 12.5: IDE Quick Start Tutorial

Exit Print View

Updated: June 2016
 
 

Code Assistance

Code Assistance is a set of IDE features that help you navigate and edit source code, specifically for unmanaged projects. For more information about editing and navigating, see Editing and Navigating Source Files.

For an unmanaged project, you can specify how your code will be parsed to enable the code assistance features of the IDE. This section will discuss how to configure code assistance and code assistance cache sharing.

Configuring Code Assistance

When you create a project, you can specify the include files and macro definitions that will be used by the built-in parser to create the configuration. If the project has been built with debug information, you can have the built-in parser automatically search for the include files and macro definitions for each compiled source file.

To specify additional code assistance configuration information that will improve the accuracy of the code assistance features of the IDE for a project, use the Configure Code Assistance wizard. To start the wizard, right-click your project and choose Configure Code Assistance. To learn more about configuring Code Assistance and the Configure Code Assistance wizard, see the relevant help sections in the IDE.

Code Assistance Cache Sharing

When parsing C/C++ source code, the IDE stores parse results on a disk in the Code Assistance cache. When you open a project, the IDE examines the cache to see if it is up to date. If the cache is up to date, the IDE does not parse your project and just loads the required data for code navigation form the Code Assistance cache.

By default, the IDE creates one code assistance cache for all your projects in your user directory in the $userdir/var/cache folder. The cache in your user directory cannot be copied or shared to another location.

However, if the Code Assistance cache is placed inside a project, it can be copied to another computer if the computer's operating system is identical to the operating system where the code was parsed and if the tool collection used by the project is available in the same location on the computer.

For more information about Code Assistance Cache sharing and to learn how to instruct the IDE to please the Code Assistance cache inside your project metadata, see Code Assistance Cache Sharing and Relocating the Code Assistance Cache for Version Controlled Projects in the IDE help.

Project Properties Options for Code Assistance

The IDE now provides the following project properties to make it easier for you to use unmanaged projects in version control systems.

Transient macros

You can provide a list of macros (–D options) that are volatile. They depend on time, date, or specific environment. These macros environment variable values will not be stored with the project's public metadata.

User Environment Variables

You can provide a list of environment variables that the project uses to pass system-specific paths. These macros environment variable values will not be stored with the project's public metadata. For unmanaged projects, you can specify the list of environment variables to be used when storing project metadata. When the IDE stores the compiler options and an option value coincides with a variable value, a macros will be written instead.

Search File System for C/C++ Header Files

If you create an unmanaged project where the sources have not been built and does not contain any debugging information, the IDE might have trouble configuring code assistance. In this case, you can specify in the Configure Code Assistance wizard to use a special mode, Search file system for C/C++ header files. In this mode, the IDE tries to resolve failed include directives by searching the file system for headers. The wizard asks you to enter the path to search for headers. By default, the path is the project source root.