Development/Documentation/UsingEclipse

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment
What is 4 + 8

Using Eclipse CDT to develop Xorg

Contents

  1. Using Eclipse CDT to develop Xorg
    1. Benefits
    2. Screenshots
    3. Installation How-to
    4. Introduction
    5. Xorg How-to
    6. Code Formatting
    7. Full tree setup
    8. Tips
    9. Other plugins

Benefits

Screenshots

http://people.freedesktop.org/~jrfonseca/eclipse/eclipse-cdt-main.png

http://people.freedesktop.org/~jrfonseca/eclipse/eclipse-cdt-remote-debug.png

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 ModularDevelopersGuide in /opt/xorg.

You can add more modules and/or debug targets in a similar fashion.

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: