CEDET (Collection of Emacs Development Environment Tools)

A collection of open-source Emacs tools for software development to turn Emacs into an IDE. Was impressive 15 years ago, at time of writing, but is very much showing its age now and has been largely displaced by other software, libraries, and even Emacs itself.

(cedet.sourceforge.net) Collection of Emacs Development Environment Tools Homepage   website

ROAM_REFS: https://cedet.sourceforge.net/

* What is CEDET?

CEDET is a *C*ollection of *E*macs *D*evelopment *E*nvironment *T*ools written with the end goal of creating an advanced development environment in Emacs. CEDET is hosted at Source Forge and is Free Software. You can view CEDET's CVS archive, project summary, and mailing lists at the CEDET Project page.

** Why is CEDET needed?

Emacs already is a great environment for writing software, but there are additional areas that need improvement. Many new ideas for integrated environments have been developed in newer products, such as Microsoft's Visual environment, JBuilder, or Eclipse. CEDET is a project which implements several advanced features developers have come to expect from an Editor.

* CEDET: A User's View

So what does an Emacs User get out of CEDET? CEDET includes the following major user features:

** Projects

The CEDET Project management system provides a few simple keystrokes for organizing your files, building Makefiles or Automake files, and compiling your sources.

If you don't want CEDET to manage your Makefiles, CEDET will still be able to identify some types of projects based on pre-existing build configurations, such as the Emacs sources, the Linux kernel, or any project built using Automake.

The entire CEDET Makefile tree was built with CEDET's project management system, so when you download and build the distribution package, you will be using a CEDET project.

The image to the right shows a part of the Project management menu.

** Smart Completion

Write code with smart code completion, sometimes known as "Intellisense". The CEDET infrastructure for parsing and tagging files, and analyzing source code is one of the most accurate completion tools for C++ anywhere. It will correctly handle inheritance scoping rules, templates, smart-pointers, and automatically filters based on what the value will be assigned into.

Code completion is not restricted to just C or C++. The completion engine is generic and works for any language that has a robust tagging parser written for CEDET, and a thin adaptation layer for the language. See the language support page to see if your language is supported.

The image to the right shows smart completion configured to use a popup menu in a CEDET unit test source file going through a templated smart pointer.

** Smart Help/Jump

Smart help shows the prototype of the variable or method under point. As with the smart completion, it will correctly identify the method under point, deriving it's correct prototype by dereferencing the datatypes through templates and smart pointers.

The smart jump feature is similar to the classic Emacs TAGS feature, except it always goes to the correct location. Using TAGS on a method name makes you scan through all the possible methods with the same name to find the one you want. Using the CEDET smart jump feature takes you to the right definition the first time.

** Symbol References

Analyze where symbols are referenced in your code base. The Symbol References tool in CEDET can use external tools such as GNU Global, ID Utils, CScope, or even find/grep to locate usages of your symbols. Every location is analyzed and displayed hierarchically showing you the file and function the reference occurs in, instead of a flat list of locations.

The image to the right shows integration with GNU Global running in the GNU Global source code.

** Code Generation

Generate code with a powerful language-independent template system. The template system in CEDET is a framework designed for code-generating application developers. Even so, the base system and templates can also be used to insert small repetitive code blocks. The template language is straight-forward, and flexible. Because it uses the same code analytics as the Smart completion, it often can correctly guess a wide range of values to be used in your templates, saving you typing.

Some pre-existing tools that use CEDET's code generation system will write texinfo documentation for you, create doxygen style comments fully filled out from the local context, or insert get/set methods for variables in a class.

The image to the right shows a simple class declaration inserted into an empty buffer.

** UML Diagrams

Create UML diagrams either by hand, or automatically generate simple 3-tier class diagrams from your sources. The diagrams are linked to your source-code, so you can browse quickly through you code from the convenience of UML.

The image to the right shows CEDET's UML tool's source code, called 'COGRE', diagramming and browsing itself. Optional unicode character support is enabled for the special characters.

** Advanced Code Browsing

With the CEDET parsing backend, advanced code browsing tools like ECB can be used. ECB, or the Emacs Code Browser provides an advanced set of UI windows docked to your Emacs frame. The extra windows provide a wide range of features, including:

  • A list of functions, classes, and methods in the current file
  • A code analyzer/completions list
  • A current definition display
  • A directory tree,
  • A list of source files in the current directory,
  • A history of recently visited files,
  • and many others

The ECB image on the right shows a sample of ECB (in full size). ECB is NOT a part of CEDET, and must be downloaded and installed seperately.

** Install and Configure CEDET

Setting up a tool as large and complex as CEDET can seem daunting. Fortunately, a minimal CEDET initialization can take up only a couple lines of code in your

.emacs
file. If you are brave and enjoy customizing your CEDET past this, then you are in luck as there are more options and small features to play with than anyone sane person might want.

Alex Ott has written a great article called A Gentle Introduction to CEDET that shows both the simple CEDET configuration process, and a wide array of customizations that helps tune your Emacs for programming the smart way.

The image to the right shows the CEDET internal package and revision testing output. Making sure all the package revisions needed are accurate is important, and fully automatic.

** Contribute to CEDET

In many ways, CEDET is a big pile of infrastructure with a thin user interface sitting on it. Consider helping CEDET by using the infrastructure to build better or more user interface tools. You can also help by adding more support for different languages. Join the cedet-devel mailing list to learn more.

(cedet.sourceforge.net) COGRE Homepage

ROAM_REFS: https://cedet.sourceforge.net/cogre.shtml

** COGRE: "Connected Graph Editor"

COGRE is pronounced similarly to cougar. It is a base library for editing and manipulating connected graphs. Additional tools will be available using COGRE for managing diagrams for UML flavors, such as a class hierarchy diagrams.

The short term goal of COGRE is just to be able to create and manipulate a few boxes linked together with lines in an Emacs buffer (or in an external graphical editor, if an appropriate solution can be found.)

The long term goal of COGRE is to provide round-trip design to code development. Semantic will parse a code in a project, and COGRE will either generate, or associate those tags with a UML diagram. Editing the diagram will then allow COGRE to save those changes back into code using SRecode.

This pie in the sky will not be possible without help. Consider creating and maintaining a language definition for Semantic, or helping define the proper blocks and link routing code for COGRE, the base graph editor. If coding is not your thing, consider making a spiffy graphic cougar for a logo, testing, or helping to document COGRE.

Local Graph

org-roam 760355e8-bb46-427b-94cb-060a277aa94b CEDET (Collection of Emacs Developmen... a3c19488-876c-4b17-81c0-67b9c7fc64ee Open-Source 760355e8-bb46-427b-94cb-060a277aa94b->a3c19488-876c-4b17-81c0-67b9c7fc64ee aca1324c-b142-4e34-a121-a8bb0a79ddf8 Emacs 760355e8-bb46-427b-94cb-060a277aa94b->aca1324c-b142-4e34-a121-a8bb0a79ddf8