| OLD | NEW |
| 1 # Linux Eclipse Dev | 1 # Linux Eclipse Dev |
| 2 | 2 |
| 3 Eclipse can be used on Linux (and probably Windows and Mac) as an IDE for | 3 Eclipse can be used on Linux (and probably Windows and Mac) as an IDE for |
| 4 developing Chromium. It's unpolished, but here's what works: | 4 developing Chromium. It's unpolished, but here's what works: |
| 5 | 5 |
| 6 * Editing code works well (especially if you're used to it or Visual Studio). | 6 * Editing code works well (especially if you're used to it or Visual Studio). |
| 7 * Navigating around the code works well. There are multiple ways to do this | 7 * Navigating around the code works well. There are multiple ways to do this |
| 8 (F3, control-click, outlines). | 8 (F3, control-click, outlines). |
| 9 * Building works fairly well and it does a decent job of parsing errors so | 9 * Building works fairly well and it does a decent job of parsing errors so |
| 10 that you can click and jump to the problem spot. | 10 that you can click and jump to the problem spot. |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 | 273 |
| 274 ### Optional: Accurate symbol information | 274 ### Optional: Accurate symbol information |
| 275 | 275 |
| 276 If setup properly, Eclipse can do a great job of semantic navigation of C++ code | 276 If setup properly, Eclipse can do a great job of semantic navigation of C++ code |
| 277 (showing type hierarchies, finding all references to a particular method even | 277 (showing type hierarchies, finding all references to a particular method even |
| 278 when other classes have methods of the same name, etc.). But doing this well | 278 when other classes have methods of the same name, etc.). But doing this well |
| 279 requires the Eclipse knows correct include paths and pre-processor definitions. | 279 requires the Eclipse knows correct include paths and pre-processor definitions. |
| 280 After fighting with with a number of approaches, I've found the below to work | 280 After fighting with with a number of approaches, I've found the below to work |
| 281 best for me. | 281 best for me. |
| 282 | 282 |
| 283 *The instrcutions below are out-of-date since it references GYP. Please see |
| 284 `gn help gen` for how to generate an Eclipse CDT file in GN. If you use |
| 285 Eclipse and make it work, please update this documentation.* |
| 286 |
| 283 1. From a shell in your src directory, run | 287 1. From a shell in your src directory, run |
| 284 `GYP_GENERATORS=ninja,eclipse build/gyp_chromium` | 288 `GYP_GENERATORS=ninja,eclipse build/gyp_chromium` |
| 285 1. This generates <project root>/out/Debug/eclipse-cdt-settings.xml which | 289 1. This generates <project root>/out/Debug/eclipse-cdt-settings.xml which |
| 286 is used below. | 290 is used below. |
| 287 1. This creates a single list of include directories and preprocessor | 291 1. This creates a single list of include directories and preprocessor |
| 288 definitions to be used for all source files, and so is a little | 292 definitions to be used for all source files, and so is a little |
| 289 inaccurate. Here are some tips for compensating for the limitations: | 293 inaccurate. Here are some tips for compensating for the limitations: |
| 290 1. Use `-R <target>` to restrict the output to considering only certain | 294 1. Use `-R <target>` to restrict the output to considering only certain |
| 291 targets (avoiding unnecessary includes that are likely to cause | 295 targets (avoiding unnecessary includes that are likely to cause |
| 292 trouble). Eg. for a blink project, use `-R blink`. | 296 trouble). Eg. for a blink project, use `-R blink`. |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 ### Additional tips | 396 ### Additional tips |
| 393 | 397 |
| 394 1. Mozilla's | 398 1. Mozilla's |
| 395 [Eclipse CDT guide](https://developer.mozilla.org/en-US/docs/Eclipse_CDT) | 399 [Eclipse CDT guide](https://developer.mozilla.org/en-US/docs/Eclipse_CDT) |
| 396 is helpful: | 400 is helpful: |
| 397 1. For improved performance, I use medium-granularity projects (eg. one for | 401 1. For improved performance, I use medium-granularity projects (eg. one for |
| 398 WebKit/Source) instead of putting all of 'src/' in one project. | 402 WebKit/Source) instead of putting all of 'src/' in one project. |
| 399 1. For working in Blink (which uses WebKit code style), feel free to use | 403 1. For working in Blink (which uses WebKit code style), feel free to use |
| 400 [this](https://drive.google.com/file/d/0B2LVVIKSxUVYM3R6U0tUa1dmY0U/view?usp
=sharing) | 404 [this](https://drive.google.com/file/d/0B2LVVIKSxUVYM3R6U0tUa1dmY0U/view?usp
=sharing) |
| 401 code-style formatter XML profile | 405 code-style formatter XML profile |
| OLD | NEW |