2011-03-31 13:59:18 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2003-11-28 21:50:02 +00:00
< html lang = "en" >
< head >
< meta http-equiv = "Content-Language" content = "en-us" >
< meta http-equiv = "Content-Type" content = "text/html; charset=UTF-8" >
< title > Using Content Assist< / title >
< link rel = "stylesheet" type = "text/css" href = "../help.css" >
< / head >
< body >
2012-09-19 17:16:24 -04:00
< div role = "main" > < h1 > Using Content Assist< / h1 >
2003-11-28 21:50:02 +00:00
2007-12-05 12:28:32 +00:00
< p > 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
2003-11-28 21:50:02 +00:00
commonly-used snippets of code.< / p >
2007-12-05 12:28:32 +00:00
< p > To insert a template or element:< / p >
2003-11-28 21:50:02 +00:00
< ol >
2007-12-05 12:28:32 +00:00
< li > In the C/C++ editor, type at least the first letter of a template or
2010-03-31 01:34:27 +00:00
element then < strong > Ctrl+Space< / strong > .< br >
2007-12-05 12:28:32 +00:00
A list displays the templates
2011-03-31 13:59:18 +00:00
< img src = "../images/template_obj.gif" alt = "Templates icon" width = "16" height = "16" > followed by the elements that start with the letter combination you typed.< br > < br >
2004-06-14 11:25:12 +00:00
< img src = "../images/contentAssist_example.png" alt = "Editor View showing Content Assist Example" >
2011-03-31 13:59:18 +00:00
< / li >
2003-11-28 21:50:02 +00:00
< li > Do one of the following:
< ul >
< li > Continue typing. The list shortens. When there is only one item in the
list, it is automatically inserted.< / li >
< li > Double-click an item in the list to insert it into your code. < / li >
2010-03-31 01:34:27 +00:00
< li > Press < strong > Esc< / strong > to close the Content Assist Window.< / li >
2003-11-28 21:50:02 +00:00
< / ul >
< / li >
< / ol >
< p > To set Content Assist preferences:< / p >
< ol >
2010-03-31 01:34:27 +00:00
< li > Click < strong > Window > Preferences< / strong > .< / li >
< li > Expand < strong > C/C++< / strong > and < strong > Editor< / strong > .< / li >
< li > Select < strong > Content Assist< / strong > .< br >
2004-06-21 10:33:03 +00:00
< img src = "../images/contentAssist_preferences.png" alt = "Content Assist Preferences" > < / li >
2009-01-19 10:06:25 +00:00
< li > Do the following:
2003-11-28 21:50:02 +00:00
< ul >
2004-04-26 15:41:43 +00:00
< li > To insert an element when you open Content Assist and it is the only
2010-03-31 01:34:27 +00:00
item in the list, select the < strong > Insert single proposals automatically< / strong > check box.< / li >
< li > To automatically insert a common prefix of all proposals, select the < strong > Insert common prefixes automatically< / strong > checkbox.< / li >
< li > To display proposals in alphabetical order, rather than by relevance, select the < strong > Present proposals in alphabetical order< / strong > checkbox. < / li >
< li > To change < strong > Auto-Activation< / strong > of content assist for ".", "->" or "::" triggers, select the appropriate checkboxes.< / li >
2003-11-28 21:50:02 +00:00
< / ul >
< / li >
2010-03-31 01:34:27 +00:00
< li > Click < strong > OK< / strong > .< / li >
2003-11-28 21:50:02 +00:00
< / ol >
2011-03-31 13:59:18 +00:00
< p > < img src = "../images/ngconcepts.gif" ALT = "Related concepts" width = "143" height = "21" >
2003-11-28 21:50:02 +00:00
< br >
< a href = "../concepts/cdt_c_content_assist.htm" > Content Assist< / a > < / p >
2011-03-31 13:59:18 +00:00
< p > < img src = "../images/ngtasks.gif" ALT = "Related tasks" width = "143" height = "21" >
2003-11-28 21:50:02 +00:00
< br >
2007-12-05 12:28:32 +00:00
< a href = "cdt_t_add_codetemp.htm" > Creating and editing templates< / a > < br >
< a href = "cdt_t_imp_code_temp.htm" > Importing and exporting templates< / a > < / p >
2011-03-31 13:59:18 +00:00
< p > < img src = "../images/ngref.gif" ALT = "Related reference" width = "143" height = "21" >
2003-11-28 21:50:02 +00:00
< br >
2007-12-05 12:42:33 +00:00
< a href = "../reference/cdt_u_c_editor_con_assist.htm" > Content Assist page< / a > < br >
< a href = "../reference/cdt_u_code_temp.htm" > Templates page< / a > < / p >
2003-11-28 21:50:02 +00:00
< p >
2004-06-24 10:49:13 +00:00
< img src = "../images/ng00_04a.gif" ALT = "IBM Copyright Statement" >
2003-11-28 21:50:02 +00:00
2012-09-19 17:16:24 -04:00
< / div > < / body >
2003-11-28 21:50:02 +00:00
< / html >