ede: Development Overview

 
 8.1 Development Overview
 ========================
 
 EDE is made up of a series of classes implemented with EIEIO. These
 classes define an interface that can be used to create different types
 of projects.
 
    EDE defines two superclasses which are ‘ede-project’ and
 ‘ede-target’.  All commands in EDE are usually meant to address the
 current project, or current target.
 
    All specific projects in EDE derive subclasses of the EDE
 superclasses.  In this way, specific behaviors such as how a project is
 saved, or how a target is compiled can be customized by a project author
 in detail.  EDE communicates to these project objects via an API using
 methods.  The commands you use in EDE mode are high-level functional
 wrappers over these methods.
 
    Some example project types are:
 
 ‘project-am’
      Automake project which reads existing Automake files.
 ‘ede-proj-project’
      This project type will create ‘Makefiles’, or ‘Makefile.am’ files
      to compile your project.
 ‘ede-linux’
      This project type will detect linux source trees.
 ‘ede-emacs’
      This project will detect an Emacs source tree.
 
    There are several other project types as well.
 
    The first class you need to know to create a new project type is
 ‘ede-project-autoload’.  New instances of this class are needed to
 define how Emacs associates different files/buffers with different
 project types.  All the autoloads are kept in the variable
 ‘ede-project-class-files’.
 
    The next most important class to know is ‘ede-project’.  This is the
 baseclass defines how all projects behave.  The basic pattern for a
 project is that there is one project per directory, and the topmost
 project or directory defines the project as a whole.
 
    Key features of ‘ede-project’ are things like name and version
 number.  It also holds a list of ‘ede-target’ objects and a list of sub
 projects, or more ‘ede-project’ objects.
 
    New project types must subclass ‘ede-project’ to add special
 behavior.  New project types also need to subclass ‘ede-target’ to add
 specialty behavior.
 
    In this way, the common EDE interface is designed to work against
 ‘ede-project’, and thus all subclasses.
 
    ‘ede-project’ subclasses ‘ede-project-placeholder’.  This is the
 minimum necessary project needed to be cached between runs of Emacs.
 This way, Emacs can track all projects ever seen, without loading those
 projects into memory.
 
    Here is a high-level UML diagram for the EDE system created with
 COGRE..
 
      +-----------------------+        +-----------------------+
      |                       |        |ede-project-placeholder|
      |ede-project-class-files|        +-----------------------+
      |                       |        +-----------------------+
      +-----------------------+        +-----------------------+
                 /\                                ^
                 \/                               /_\
                  |                                |
       +--------------------+                +-----------+         +----------+
       |ede-project-autoload|                |ede-project|         |ede-target|
       +--------------------+<>--------------+-----------+<>-------+----------+
       +--------------------+                +-----------+         +----------+
       +--------------------+                +-----------+         +----------+
                                                   ^
                                                  /_\
                                                   |
                             +---------------------+-----------------+
                             |                     |                 |
                             |                     |                 |
                             |                     |                 |
                    +----------------+   +-------------------+  +---------+
                    |ede-proj-project|   |project-am-makefile|  |ede-emacs|
                    +----------------+   +-------------------+  +---------+
                    +----------------+   +-------------------+  +---------+
                    +----------------+   +-------------------+  +---------+