From 93fc3f322b2974744b010104d329036a16e8c43d Mon Sep 17 00:00:00 2001 From: Andrew Gvozdev Date: Wed, 2 Jun 2010 17:51:10 +0000 Subject: bug 289168: "Tuning Error Parsers" chapter in the doc. --- .../reference/cdt_u_console_view.htm | 2 +- .../reference/cdt_u_newproj_parser_error.htm | 2 +- .../cdt_u_prop_build_settings_errparser.htm | 2 +- .../tasks/cdt_o_build_task.htm | 2 +- doc/org.eclipse.cdt.doc.user/tasks/cdt_o_tasks.htm | 2 +- .../tasks/cdt_t_proj_error_parser.htm | 101 +++++++++++++-------- doc/org.eclipse.cdt.doc.user/topics_Tasks.xml | 2 +- 7 files changed, 67 insertions(+), 46 deletions(-) diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_console_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_console_view.htm index 2e5df1358a6..3c188cc7138 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_console_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_console_view.htm @@ -142,7 +142,7 @@ you see one or more of the following options in a context menu depending on the

Related references
C/C++ Views and Editors -
Filtering errors +
Tuning Error Parsers


diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_parser_error.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_parser_error.htm index c6c1c1fa213..bdb4c96789b 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_parser_error.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_parser_error.htm @@ -58,7 +58,7 @@ Build overview

Related tasks
-Filtering errors

+Tuning Error Parsers

Related reference
New CDT Project Wizard


diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_errparser.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_errparser.htm index 52c5599df83..f7d6f0a66ac 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_errparser.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_errparser.htm @@ -64,7 +64,7 @@ build output log.

Related tasks
-Filtering errors

+Tuning Error Parsers

Related referenceRenaming a project
Defining Project Build settings
Adding and Editing Build Variables
- Filtering errors
+ Tuning Error Parsers
Selecting a binary parser
Adding include paths and symbols
Selecting a project type
diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_tasks.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_tasks.htm index 50912cf8203..0cd5f40ae51 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_tasks.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_tasks.htm @@ -39,7 +39,7 @@ Renaming a project
Selecting referenced projects
Defining Project Build settings
- Filtering errors
+ Tuning Error Parsers
Selecting a binary parser
Adding Include paths and symbols
Selecting a deployment platform
diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_error_parser.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_error_parser.htm index afd2b7abf90..510bf7fc4a8 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_error_parser.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_error_parser.htm @@ -6,59 +6,80 @@ -Filtering errors +Tuning Error Parsers -

Filtering errors

+

Tuning Error Parsers

-

The Error Parsers page of the Properties window lists a set of filters that detect error patterns in -the build output log.

+

Error Parsers scan build output line by line looking for errors and warnings + (also for certain informational messages). They generate Problem Markers + which visually indicate those problems to a user. The problems are highlighted on the Console, + populate the Problems view and shown in the editor. Problem markers are organized + into Error Error, + Warning Warning + and InfoInfocategories. +

-

If an error or warning is detected, an icon appears on the file in the Tasks -view. If the file is not found, the icon appears on the project.

+

There are several predefined Error Parsers where each one can handle output of a specific tool. +Normally a toolchain defines a set of Error Parsers to deal with output of each tool. It is possible +to redefine that set on a per-project basis in project properties: +

+

+

    +
  1. In the C/C++ Projects view, right-click the project, and select Properties.
  2. +
  3. Expand C/C++ Build.
  4. +
  5. Select Settings.
  6. +
  7. Click the Error Parsers tab.
  8. +
  9. In the Error parsers list, select error parsers.
  10. +
  11. Click OK.
  12. +
+

+

Note that the order of error parsers is significant. Normally an error parser will consume +the line where it spotted an error/warning and the others down the line won't get a chance to parse it. +

-

You can define the properties on a per project basis in the New CDT Project -wizard, in the C/C++ Projects view, or in the Navigator view. You can also define -project properties in the Preferences window for future make projects.

+

CDT provides one special kind of error parser, CDT pushd/popd CWD Locator. +This parser does not create problem markers but it is looking for output of pushd +and popd commands which are commonly used in makefiles to print the Current Working Directory (CWD). +CDT can use this information to associate the file names appearing in the output relative to the CWD. +Note that that kind of parser needs to be the first to be able to provide the CWD to the other parsers. +

-

To select error parsers:

+

Most of the error parsers are configurable via regular expression patterns and a user can: +

+

+

+

-
    -
  1. Do one of the following:
  2. -
-
  • To set properties for makefile projects, do the following: -
      -
    1. Select Window > Preferences . -
    2. Expand C/C++. -
    3. Expand New CDT project wizard. -
    4. Click Makefile Project.
    5. -
    -
  • For a typical make project, do the following: -
      -
    1. In the C/C++ Projects view, right-click the project, and select Properties. -
    2. Expand C/C++ Build.
    3. -
    4. Select Settings. -
    -
  • - -
  • Click the Error Parsers tab.
  • -
  • In the Error parsers list, select error parsers.
  • -
  • Click OK.
  • - -

    Related concepts -
    - CDT Projects
    - Project file views

    +

    To customize Error parsers do following: +

    +

    +

      +
    1. Select Window > Preferences .
    2. +
    3. Expand C/C++.
    4. +
    5. Select Error Parsers tab.
    6. +
    7. Select error parser or Add a new one.
    8. +
    9. Follow Build preferences to define your custom patterns
    10. +
    +

    +

    Related concepts +
    CDT Projects +
    Project file views +

    -

    Related reference -
    -Error Parsers, C/C++ Properties window

    +

    Related reference +
    Error Parsers, C/C++ Properties window +
    Build preferences +

    QNX Copyright Statement diff --git a/doc/org.eclipse.cdt.doc.user/topics_Tasks.xml b/doc/org.eclipse.cdt.doc.user/topics_Tasks.xml index b293d389f32..5ebe2782b86 100644 --- a/doc/org.eclipse.cdt.doc.user/topics_Tasks.xml +++ b/doc/org.eclipse.cdt.doc.user/topics_Tasks.xml @@ -32,7 +32,7 @@ - + -- cgit v1.2.3