UsingEclipse

Using Eclipse CDT to develop Xorg

Benefits

Screenshots

Installation How-to

If you're only interested in C/C++ development the simplest option is to download Eclipse IDE for C/C++ Developers and extract it into /opt.

Otherwise, you can always install CDT from the Eclipse Update Manager.

Then install the Eclipse-Autotools integration plugin, which provides assistance for projects using autotools.

Introduction

Eclipse organizes code in projects and workspaces.

NOTE: You don't need to create a project for every single X.Org module, and that would be overkill. The modules you are planning to actively develop and debug are perfectly sufficient, as you can still open and debug through files outside the projects.

Eclipse organizes windows in views and perspectives.

Xorg How-to

It is assumed you have installed the xorg development packages from your distribution, or you have built xorg from source as explained in the Building the X Window System in /opt/xorg.

Code Formatting

CDT allows to specify the C code style from Window > Preferences > C/C++ > Code style property page.

You can import this profile, which was made to follow these (un)official guidelines as close as possible.

There is also a code style for Mesa.

Full tree setup

You can add the whole tree as a project, which is advantageous when cross-module work is done, or you are interested in module interdependecies. However, index generation can get darn slow then. Manually specifying include directories and disabling automated discovery in the project's discovery options may be helpful.

Also, eclipse prior to ganymede had the tendency to spend a few minutes on collecting the (admittedly huge) index whenever you'd type a member access operator (. or ->). Disabling Content Assist should help that.

Tips

Check more tips in:

Other plugins

Must have:

Optional: