From 8bcd0490f9f41bb15b0c49216cf07d219ebe20dd Mon Sep 17 00:00:00 2001 From: David Daoust Date: Sun, 11 Apr 2004 13:11:23 +0000 Subject: [PATCH] From Dave Williams: Contains fixes to html links, update to What's New and added content for Code Assist. --- .../concepts/cdt_c_comments.htm | 31 ++++-- .../concepts/cdt_c_content_assist.htm | 92 +++++++++--------- .../concepts/cdt_c_over_cdt.htm | 38 ++++---- .../concepts/cdt_c_projects.htm | 51 ++++------ .../concepts/cdt_c_whatsnew.htm | 96 ++++++++++++++++--- .../concepts/cdt_o_concepts.htm | 12 +-- .../concepts/cdt_o_home.htm | 28 +++--- doc/org.eclipse.cdt.doc.user/help.css | 3 +- 8 files changed, 214 insertions(+), 137 deletions(-) diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_comments.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_comments.htm index 10e17fa86cb..3da95a40950 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_comments.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_comments.htm @@ -3,8 +3,6 @@ - - Comments @@ -14,14 +12,33 @@

Comments

-

You can select one or more lines of code, right-click, and click Comment -to add the leading characters // to the beginning of lines. When -you uncomment lines of code, the leading // characters are removed -from the selected lines.

+

Comment

+

You can quickly comment out one or more lies of code by inserting the leading +characters // at the beginning of the line. To do so, select the line +(or lines) of code you want to comment out and press CTRL+/ (slash).

-

Tip: The characters /* */ on lines that already are +

Uncomment

+

To uncomment select the line (or lines) of code, and press CTRL+\ +(backslash). + +

Tip: The characters /* */ on lines that are already commented out, are not affected when you comment and uncomment code.

+

Multiline comment

+

You can use the Content Assist feature to insert a multiline comment before a method. +Type com+Ctrl+Space, and the following code is entered at the cursor location: +

+/*
+ * author userid
+ *
+ * To change this generated comment edit the template variable "comment":
+ * Window>Preferences>C>Templates.
+ */
+ 
+ + To change the default comment click Window > Preferences > C > Templates. For more information see the + Content Assist section. +

Related concepts
Content Assist and code completion

diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_content_assist.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_content_assist.htm index 7afccd2f33e..6327e515f11 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_content_assist.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_content_assist.htm @@ -2,75 +2,79 @@ - - - - -Content assist - + + + Content assist + -

Content assist

+

Content Assist

-

In the C/C++ editor, when you enter a letter combination in the editor, -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.

+

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.

-

Code Completion

+

Code completion

-

Content assist provides code completion assistance while you code from within -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 in the order shown below:

+

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 trigger the Code completion feature when you call Content Assist (such as when you type Ctrl+Space), but you alsow invoke it when you type +".", "->" or "::".

+ +C++ example showing Code Assist popup +

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.

-

Code Templates

+

Code templates

-

Code templates are frequently used sections of code that you can create and -then save for reuse. The Content Assist feature also provides access to code -templates. Code Template names beginning -with the letter combination you entered are displayed in a list in alphabetical -order followed by code elements. You can then select a code template from the list and -it is inserted directly -into your code.

+

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.

-

For example, the code template do - while statement contains the code:

+

You can then select a code template from the list and it is inserted directly into your code.

-

do {
-${cursor}
-} while (${condition});

+

C++ example showing Code Assist popup

-

When you select the do code template from the list, the -following is inserted in your code:

+

For example, the code template do while statement contains the following code:

-

-do {
-} while (condition);

+

do {
+${cursor}
+} while (${condition});

-

A selection of common code templates are already defined. These can be browsed in -Window > Preferences > C/C++ > Code Templates.

+

When you select the do code template from the list, you insert the following code:

-

You can create, import and, export code templates.

+

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) {
+	
+}

Related concepts
diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_over_cdt.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_over_cdt.htm index a02052c81f9..f3b976eef7a 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_over_cdt.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_over_cdt.htm @@ -1,27 +1,21 @@ - - - - - -CDT overview - + + + CDT overview + -

CDT overview

- -

The C/C++ development tool (CDT) is a set of Eclipse plugins that provide a -C/C++ development environment on the Eclipse platform. For more information on +

The C/C++ Development Toolkit (CDT) is a set of Eclipse plugins that provide +C and C++ extensions to the Eclipse workbench. For more information about Eclipse, see Workbench User Guide > Concepts > Workbench.

-

The CDT provides a graphical interface for many of the same tools -that you use from the command line. The CDT communicates with, and interprets -messages from, utilities that include:

- +

The CDT provides a C/C++ IDE that simplifies many of the same tools that +you can use from the command line. The CDT can also communicate with many external +utilities and intepret their responses, such as:

-

The CDT is launched as the C/C++ perspective of the Eclipse workbench. The +

The CDT opens as the C/C++ perspective of the Eclipse workbench. The C/C++ perspective consists of an editor and the following views: