all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* What IDE features are in CEDET?
@ 2008-04-25 17:27 Eric M. Ludlam
  2008-04-25 20:09 ` Lennart Borgman (gmail)
  2008-04-26  4:45 ` Richard M Stallman
  0 siblings, 2 replies; 10+ messages in thread
From: Eric M. Ludlam @ 2008-04-25 17:27 UTC (permalink / raw)
  To: emacs-devel

There are a couple threads going about IDE code features, what does it
all mean, and what role does CEDET fill in all this.  Let me try to
answer the last question.

My long term goal for CEDET is wider than just intellisense.  The
intellisense that currently works in the CEDET/Semantic piece is a
small part of where I'd like to go that has turned into a big project.
I want to see Emacs provide round-trip code to UML and back again
interface that works for any language, where refactoring can occur w/
a UML diagram editor that re-writes your code.  Anyone familiar with
"Together" which I think is now owned by IBM will know what I mean.

This background will hopefully make the parts in CEDET more logically
connected.

If we batch up various IDE like features and list their requirements,
you need a couple things up front:

1) Project management -
   Emacs needs to know how a project is laid out so it can find the
   files that contain the code that you want to operate on.  This is
   the CEDET/EDE part.

   EDE supports automake directly (no extra work needed by users), or
   you can build projects via menus/keybindings that builds
   [auto]makefiles for you.

   I'd label EDE as needing testing, but otherwise sufficient for many
   tasks.  CEDET uses EDE for its own build infrastructure.

2) Code parsing / Code structure database
   Emacs needs to understand the code you want to work with, and that
   parsing infrastructure needs to translate any language into a
   generic form that tools can manipulate without knowing the source
   language.  This is the CEDET/Semantic part.

   There are pre-written parsers for C++, python, java, and others.
   There are also pre-written tools against the parser output
   implementing eldoc like behavior, plus smart completion.

   I also have a database system that catalogs the structure of your
   project, and keeps that data persistent.  There is an abstract
   layer so that the all-Emacs Lisp solution can be replaced with
   anything, such as beanshell (java) or ebrowse (C++).

   I'd say that the Semantic core is stable, the core languages with
   parsers are pretty good.  The C++ parser really needs to be ported
   from the old (semantic version 1) parser to the new bison based
   parser David Ponce wrote, and the gcc-xml thing I read about
   recently is another neat option that could be used.

3) Object system
   Writing the above needs some sort of OO infrastructure, so 
   CEDET/EIEIO provides a CLOS like layer in Emacs.

   EIEIO has been stable for me for a long time, and has a bunch of
   unit tests to keep it that way.


To follow up with the code generation/UML diagram thing, you need a
couple more features.


4) Code Generation
   To go in and re-write someone's code, you need a way to provide
   code generation.  Your refactoring tool will probably want to have
   a language independent core, so you need an abstraction layer
   between code-specific constructs and what you would code to in
   Lisp.  CEDET/Semantic provides the data structure for representing
   code at a high level (functions, variables, types, etc) and
   CEDET/SRecode provides a template authoring and cataloging tool.

   With SRecode as found in CEDET/CVS now, you can parse a Java File
   W/ Semantic, then write out the output from the semantic parser into a
   C++ file and get something that is mostly correct.

   I have not yet delved into writing code (ie if (..) { } else {}) 
   part, just the structure (ie functions, variables, types, etc).

   I'd say that the SRecode core is in good shape, but the language
   specific templates need a lot of help.

5) UML editing.
   UML editing isn't really needed for most coding tasks, but it's on
   my list for round trip graphic editing.  The CEDET/COGRE part has
   only the most rudimentary parts needed.


Ok, sounds good.  What's missing?

* These tools do not delve far into the code part, just the declarations.
  The Semantic parsing infrastructure can certainly handle it, I just
  haven't gone there.

* The number of languages supported is still meager.

* UI related features.  I seem to spend a lot of time on
  infrastructure, and less where the user actually types stuff in.
  Resolving where to bind the functionality into the typical Emacs
  user's workflow needs help.

  In addition, the data generated by Semantic could do a lot more, but
  no one has written the tooling for it.  The good news is that if
  someone wants to build dependency tree diagrams, subclass warnings,
  method override highlighting, or whatever, you can write it once for
  any language that supports the feature you want and has a parsing
  infrastructure associated with it.

* Parsers for indenting / coloring
  I get this question alot.  Can a Semantic parser be used for
  indentation or coloring?  Answer: yes.  I just haven't done it.  The
  more interesting question is, can a single parser provide data about
  the code, indentation, and coloring at the same time without making
  it too hard to maintain? 


There are a lot of little tools in CEDET beyond what I discussed
above, but these are the big features.

Eric

-- 
          Eric Ludlam:                       eric@siege-engine.com
   Siege: www.siege-engine.com          Emacs: http://cedet.sourceforge.net




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-04-28  2:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-25 17:27 What IDE features are in CEDET? Eric M. Ludlam
2008-04-25 20:09 ` Lennart Borgman (gmail)
2008-04-25 21:45   ` Re[2]: " Eric M. Ludlam
2008-04-25 22:09     ` Lennart Borgman (gmail)
2008-04-25 23:16       ` Re[2]: " Eric M. Ludlam
2008-04-26 14:49         ` Richard M Stallman
2008-04-26  4:45 ` Richard M Stallman
2008-04-26 12:26   ` Re[2]: " Eric M. Ludlam
2008-04-26 21:54     ` Richard M Stallman
2008-04-28  2:28       ` Re[2]: " Eric M. Ludlam

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.