Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse C/C++ Developer Guide
Previous Page Home Next Page

Using Content Assist

Use Content Assist to insert C/C++ elements of your project, and templates into your code. You can insert a template into your source code rather than retyping commonly-used snippets of code.

To insert a template or element:

  1. In the C/C++ editor, type at least the first letter of a template or element then Ctrl+Space.
    A list displays the templates Templates icon followed by the elements that start with the letter combination you typed.

  2. Editor View showing Content Assist Example
  3. Do one of the following:
    • Continue typing. The list shortens. When there is only one item in the list, it is automatically inserted.
    • Double-click an item in the list to insert it into your code.
    • Press Esc to close the Content Assist Window.

To set Content Assist preferences:

  1. Click Window > Preferences.
  2. Expand C/C++ and Editor.
  3. Select Content Assist.
    Content Assist Preferences
  4. Do the following:
    • To insert an element when you open Content Assist and it is the only item in the list, select the Insert single proposals automatically check box.
    • To automatically insert a common prefix of all proposals, select the Insert common prefixes automatically checkbox.
    • To display proposals in alphabetical order, rather than by relevance, select the Present proposals in alphabetical order checkbox.
    • To change Auto-Activation of content assist for ".", "->" or "::" triggers, select the appropriate checkboxes.
  5. Click OK.

Related concepts
Content Assist

Related tasks
Creating and editing templates
Importing and exporting templates

Related reference
Content Assist page
Templates page

IBM Copyright Statement


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire