Content Assist is a set of tools built into the CDT that can reduce the number of keystrokes you must type to create your code. The Content Assist plugin consists of several components that forecast what a developer will type, based on the current context, scope, and prefix.
Content assist provides code completion in the body of a method or a function. For the current project (and any referenced projects) a list is displayed of the elements that begin with the letter combination you entered, and the relevance of each proposal is determined in the following order:
You can view the signature of each item on the list in a pop-up by pointing to it. You can then select an item in the list to insert it directly into your code. Newly created elements in your current or referenced project(s) must be saved before they will appear in the Content Assist list.
You can create and save code templates for frequently used sections of code. The Content Assist feature also provides quick access to code templates.
When you enter a letter combination in the C/C++ editor, and type CTRL+SPACE (or right-click and click Content Assist), a list of code elements and code templates that start with the letter combination that you typed is displayed.
You can then select a code template from the list and it is inserted directly into your code.
For example, the code template do while statement contains the following code:
do { ${cursor} } while (${condition});
When you select the do code template from the list, you insert the following code:
do { } while (condition);
If the completion engine finds only one proposal in your templates, that proposal is inserted at the current cursor position. For example if you create a new CPP file and type mai+CTRL+SPACE the following code is inserted at the cursor location:
int main(int argc, char **argv) { }
Using Content Assist
Creating and editing code templates
Importing and exporting code templates