Chromium Code Reviews| 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 280 | 280 |
| 281 ### Optional: Accurate symbol information | 281 ### Optional: Accurate symbol information |
| 282 | 282 |
| 283 If setup properly, Eclipse can do a great job of semantic navigation of C++ code | 283 If setup properly, Eclipse can do a great job of semantic navigation of C++ code |
| 284 (showing type hierarchies, finding all references to a particular method even | 284 (showing type hierarchies, finding all references to a particular method even |
| 285 when other classes have methods of the same name, etc.). But doing this well | 285 when other classes have methods of the same name, etc.). But doing this well |
| 286 requires the Eclipse knows correct include paths and pre-processor definitions. | 286 requires the Eclipse knows correct include paths and pre-processor definitions. |
| 287 After fighting with with a number of approaches, I've found the below to work | 287 After fighting with with a number of approaches, I've found the below to work |
| 288 best for me. | 288 best for me. |
| 289 | 289 |
| 290 *The instrcutions below are out-of-date since it references GYP. Please see | |
| 291 `gn help gen` for how to generate an Eclipse CDT file in GN. If you use | |
| 292 Eclipse and make it work, please update this documentation.* | |
| 293 | |
| 294 1. From a shell in your src directory, run | 290 1. From a shell in your src directory, run |
| 295 `GYP_GENERATORS=ninja,eclipse build/gyp_chromium` | 291 `gn gen --ide=eclipse out/Debug_gn/' (replacing Debug_gn with the output dir ectory you normally use when building). |
| 296 1. This generates <project root>/out/Debug/eclipse-cdt-settings.xml which | 292 1. This generates <project root>/out/Debug_gn/eclipse-cdt-settings.xml whic h |
| 297 is used below. | 293 is used below. |
| 298 1. This creates a single list of include directories and preprocessor | 294 1. This creates a single list of include directories and preprocessor |
| 299 definitions to be used for all source files, and so is a little | 295 definitions to be used for all source files, and so is a little |
| 300 inaccurate. Here are some tips for compensating for the limitations: | 296 inaccurate. Here are some tips for compensating for the limitations: |
| 301 1. Use `-R <target>` to restrict the output to considering only certain | |
| 302 targets (avoiding unnecessary includes that are likely to cause | |
| 303 trouble). Eg. for a blink project, use `-R blink`. | |
|
Dirk Pranke
2016/07/06 18:19:26
You might replace this with a mention of the --fil
| |
| 304 1. If you care about blink, move 'third\_party/Webkit/Source' to the | 297 1. If you care about blink, move 'third\_party/Webkit/Source' to the |
| 305 top of the list to better resolve ambiguous include paths (eg. | 298 top of the list to better resolve ambiguous include paths (eg. |
| 306 `config.h`). | 299 `config.h`). |
| 307 1. Import paths and symbols | 300 1. Import paths and symbols |
| 308 1. Right click on the project and select Properties > C/C++ General > Paths | 301 1. Right click on the project and select Properties > C/C++ General > Paths |
| 309 and Symbols | 302 and Symbols |
| 310 1. Click Restore Defaults to clear any old settings | 303 1. Click Restore Defaults to clear any old settings |
| 311 1. Click Import Settings... > Browse... and select | 304 1. Click Import Settings... > Browse... and select |
| 312 `<project root>/out/Debug/eclipse-cdt-settings.xml` | 305 `<project root>/out/Debug/eclipse-cdt-settings.xml` |
| 313 1. Click the Finish button. The entire preferences dialog should go away. | 306 1. Click the Finish button. The entire preferences dialog should go away. |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 403 ### Additional tips | 396 ### Additional tips |
| 404 | 397 |
| 405 1. Mozilla's | 398 1. Mozilla's |
| 406 [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) |
| 407 is helpful: | 400 is helpful: |
| 408 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 |
| 409 WebKit/Source) instead of putting all of 'src/' in one project. | 402 WebKit/Source) instead of putting all of 'src/' in one project. |
| 410 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 |
| 411 [this](https://drive.google.com/file/d/0B2LVVIKSxUVYM3R6U0tUa1dmY0U/view?usp =sharing) | 404 [this](https://drive.google.com/file/d/0B2LVVIKSxUVYM3R6U0tUa1dmY0U/view?usp =sharing) |
| 412 code-style formatter XML profile | 405 code-style formatter XML profile |
| OLD | NEW |