ceclipseeclipse-cdtganymede

Eclipse Ganymede hacks, hints, tips, tricks, and best practices


I've recently started using Eclipse Ganymede CDT for C development and I couldn't like it more. I'm aware the learning curve could be sort of pronounced, therefore and with your help, my goal is to flatten it as much as possible. I'm looking for the best hacks, hints, tips, tricks, and best practices to really unleash the full power of the IDE.


Solution

  • Accurate Indexing

    With CDT you should be sure to enable the "Full Indexing" option rather than the "Fast Indexing" default. It's not perceptibly slower on modern hardware and it does a much better job. In that vein, you should be sure to enable semantic highlighting. This isn't as important in C/C++ as it is in a language like Scala, but it's still extremely useful.

    Streamlined Editing

    Get used to using Ctrl+O and Ctrl+Alt+H. The former pops up an incrementally searchable outline view, while the latter opens the "Call Hierarchy" view and searches on the currently selected function. This is incredibly useful for tracing execution.

    Ctrl+Shift+T (Open Type) isn't exactly an "editing" combo per se, but it is equally important in my workflow. The C++ Open Type dialog not only allows incremental filtering by type, but also selecting of definition (.h) or declaration (.cpp) and even filtering by element type (typedef, struct, class, etc).

    Task Oriented Programming

    Mylyn: never leave home without it. I just can't say enough about this tool. Every time I'm forced to do without it I find myself having to re-learn how to deal with all of the code noise. Very, very handy to have.

    Stripped Down Views

    The default Eclipse workspace layout is extremely inefficient both in space and in usability. Everyone has their favorite layout, take some time and find yours. I like to minimize (not necessarily close) everything except for Outline and keep the C/C++ Project Explorer docked in the sidebar configured to precisely hide the Outline when expanded. In this way I can always keep the editor visible while simultaneously reducing the space used by views irrelevant to the current task.