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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 First, turn off automatic workspace refresh and automatic building, as Eclipse | 112 First, turn off automatic workspace refresh and automatic building, as Eclipse |
113 tries to do these too often and gets confused: | 113 tries to do these too often and gets confused: |
114 | 114 |
115 1. Open Window > Preferences | 115 1. Open Window > Preferences |
116 1. Search for "workspace" | 116 1. Search for "workspace" |
117 1. Turn off "Build automatically" | 117 1. Turn off "Build automatically" |
118 1. Turn off "Refresh using native hooks or polling" | 118 1. Turn off "Refresh using native hooks or polling" |
119 1. Click "Apply" | 119 1. Click "Apply" |
120 | 120 |
| 121 Chromium uses C++11, so tell the indexer about it. Otherwise it will get |
| 122 confused about things like std::unique_ptr. |
| 123 |
| 124 1. Open Window > Preferences > C/C++ > Build > Settings > Discovery > |
| 125 CDT GCC Build-in Compiler Settings |
| 126 1. In the text box entitled Command to get compiler specs append "-std=c++11" |
| 127 |
121 Create a single Eclipse project for everything: | 128 Create a single Eclipse project for everything: |
122 | 129 |
123 1. From the File menu, select New > Project... | 130 1. From the File menu, select New > Project... |
124 1. Select C/C++ Project > Makefile Project with Existing Code | 131 1. Select C/C++ Project > Makefile Project with Existing Code |
125 1. Name the project the exact name of the directory: "src" | 132 1. Name the project the exact name of the directory: "src" |
126 1. Provide a path to the code, like /work/chromium/src | 133 1. Provide a path to the code, like /work/chromium/src |
127 1. Select toolchain: Linux GCC | 134 1. Select toolchain: Linux GCC |
128 1. Click Finish. | 135 1. Click Finish. |
129 | 136 |
130 Chromium has a huge amount of code, enough that Eclipse can take a very long | 137 Chromium has a huge amount of code, enough that Eclipse can take a very long |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 ### Additional tips | 403 ### Additional tips |
397 | 404 |
398 1. Mozilla's | 405 1. Mozilla's |
399 [Eclipse CDT guide](https://developer.mozilla.org/en-US/docs/Eclipse_CDT) | 406 [Eclipse CDT guide](https://developer.mozilla.org/en-US/docs/Eclipse_CDT) |
400 is helpful: | 407 is helpful: |
401 1. For improved performance, I use medium-granularity projects (eg. one for | 408 1. For improved performance, I use medium-granularity projects (eg. one for |
402 WebKit/Source) instead of putting all of 'src/' in one project. | 409 WebKit/Source) instead of putting all of 'src/' in one project. |
403 1. For working in Blink (which uses WebKit code style), feel free to use | 410 1. For working in Blink (which uses WebKit code style), feel free to use |
404 [this](https://drive.google.com/file/d/0B2LVVIKSxUVYM3R6U0tUa1dmY0U/view?usp
=sharing) | 411 [this](https://drive.google.com/file/d/0B2LVVIKSxUVYM3R6U0tUa1dmY0U/view?usp
=sharing) |
405 code-style formatter XML profile | 412 code-style formatter XML profile |
OLD | NEW |