A good tool getting better
This is an archived article. It is here for historical and nostalgic reasons only. The article will most likely contain broken links and/or missing images as it was automatically converted from an old blog long gone.
I consider the C/C++ development tools (short: CDT) one of the best plugins for Eclipse. Since version 6, they are so good that Eclipse has become my favorite IDE for C and C++ development. The Eclipse code editor has always been good and CDT offers a host of nice features, like semantic highlighting (and this with good performance, even in large projects), excellent code navigation and very good code assistance. The CDT build system is flexible and does not force you to use one specific compiler (i.e. GCC) as it is perfectly possible to use the MS compilers and build tools.
Eclipse’s integration of the Subversion version control system is also excellent and makes using SVN enjoyable.
CDT version 7 is on the way
And I can tell you, it will be even better. I have installed the latest milestone (M5) release of CDT version 7 on my Eclipse 3.6 M6 installation, just to test it out a bit. Rather quickly, I realized that this is already a very mature, though not perfect, build and I’am now using it on a daily base with few or little issues.
Much better indexer
Up to version 6, the CDT offered two different indexing methods. The fast indexer (which was the recommended one to use), optimized for good performance and the full indexer which was working slower but more accurate. The fast indexer was indeed fast, but sometimes failed to fully index your code which usually resulted in symbols or methods being unknown. As a consequence, unknown symbols are not properly highlighted nor are they available for the various content assist features. The full indexer had fewer issues with recognizing symbols except for the occasional problem with overloaded functions or functions with default parameters.
In CDT7, there is only one indexer and I have got the impression that it works more accurate and much faster than the old full indexer and, honestly, it doesn’t appear to be slower than the old fast indexing method. First-time indexing of a huge project may still take a while, but once the initial index had been built, everything runs very smooth. Re-indexing a single file after doing some changes (i.e. adding a new method) happens in the background without noticeable delay in the editor and it usually takes less than a second until the newly added code will be properly highlighted and available in the content assist.
More code analysis
Also new is a feature that analyzes your code as you type and will warn you about some common errors like missing braces or the infamous if( foo = bar ) typo. The warnings can be customized somewhat and will appear in the General/Problems view. It might not be as clever as the code inspection Eclipse offers for Java or what IntelliJ IDEA does for all languages it supports, but it does its job of detecting a number of very common mistakes. I also do not know if this feature is already complete in the current milestone as there is little documentation available at the moment.
The new indexer alone will make this a good release as it solves most of the small issues the old code indexer had shown every now and then. The simple (but useful) problem analyzer is a nice goodie and complements the already good syntax checker.
If you want to try it out yourself, you can get it here. Of course, I strongly recommend to install this on a fresh extra Eclipse installation and leave your current environment untouched. I also believe, the CDT7 milestone build won’t run on anything older than Eclipse 3.6 M6 (or maybe M5), so you need a new test install anyway, unless you are using the 3.6 milestones as production environment.