ECB

ECB

Post by Joe » Wed, 09 Jul 2003 00:18:19



Based on some posts I read I loaded up ECB for the first time
and I really like what I see.  Figured ECB deserves its own thread.

Is it possible for ECB to "know about" classes and where they are defined?

For example,

I have a "symbol" window on the left and if I click on a symbol, the
edit window moves to that location.  Nice.

Now, the symbol window seems to know about classes (C++) since it lists
base classes in a "parent" section.  What I want is to click on the
parent and go directly to the definition of the base class.  Tags?
Intellisense?  How do I do this?

 
 
 

ECB

Post by Eric Ludla » Wed, 09 Jul 2003 22:45:56



>Based on some posts I read I loaded up ECB for the first time
>and I really like what I see.  Figured ECB deserves its own thread.

>Is it possible for ECB to "know about" classes and where they are defined?

>For example,

>I have a "symbol" window on the left and if I click on a symbol, the
>edit window moves to that location.  Nice.

>Now, the symbol window seems to know about classes (C++) since it lists
>base classes in a "parent" section.  What I want is to click on the
>parent and go directly to the definition of the base class.  Tags?
>Intellisense?  How do I do this?

Hi,

  At the simplest level, you can create a tags table, and just use
M-. to go to the definition of what ever you want.

  The intellisense question is answered here:
  http://cedet.sourceforge.net/intellisense.shtml

  The rest of my answer is mostly for Klaus since it gets into how
Semantic (the parser that understands all the C++ mumbo-jumbo) works.

  First, there is some code that will scan all the files that have
already been loaded into Emacs and form an organized class hierarchy
so you can jump between files.  Speedbar uses this to create an
ordered tree of the entire set of class hierarchies for a given
project.  It doesn't auto-refresh, but that can be fixed.

  Second, if semanticdb is enabled, and you have a meta-tag
representation (a tag describing a tag you don't actually have a
pointer to at the moment.) you can find it with semanticdb.  The CVS
version of semantic happens to have a special search routine for
finding a 'class' with a given 'name' too.

Eric
--
Eric Ludlam             "Photonic Doodler"    The MathWorks x 7556



 
 
 

ECB

Post by Paul Kinnuca » Wed, 09 Jul 2003 23:56:46



> Based on some posts I read I loaded up ECB for the first time
> and I really like what I see.  Figured ECB deserves its own thread.

> Is it possible for ECB to "know about" classes and where they are defined?

> For example,

> I have a "symbol" window on the left and if I click on a symbol, the
> edit window moves to that location.  Nice.

> Now, the symbol window seems to know about classes (C++) since it lists
> base classes in a "parent" section.  What I want is to click on the
> parent and go directly to the definition of the base class.  Tags?
> Intellisense?  How do I do this?


provides true, object-oriented symbol-to-definition navigation for
Java code (i.e., a key combination takes you to the code that defines the
field or method of the specific class referenced by the symbol at
point) as well as object-oriented field and method completion
(Intellisense), and method cross-referencing (e.g., navigate to
every line on the Java source path that calls the method at point).

The JDEE and ECB work very well together.

- Paul

 
 
 

ECB

Post by RBP » Fri, 11 Jul 2003 11:39:16


Thanks, Eric.  I already use etags... just thought semantic might be better
or easier to use.  I'm looking for a nice, simple class broswer for C++.
Semantic almost works but it should have something to generate all the cache
files without having to visit each file (my source tree has a few thousand
files).  Also, when I turn on the global auto-parse mode, emacs tends to
freak out a bit and parse the same file over and over (about every 5
seconds) even though the file is read-only and not being modified.

Guess I'll stick with plain old tags.

Thanks for the J2EE advice as well... but in an embedded environment, Java
is not the language of choice...



> >Based on some posts I read I loaded up ECB for the first time
> >and I really like what I see.  Figured ECB deserves its own thread.

> >Is it possible for ECB to "know about" classes and where they are
defined?

> >For example,

> >I have a "symbol" window on the left and if I click on a symbol, the
> >edit window moves to that location.  Nice.

> >Now, the symbol window seems to know about classes (C++) since it lists
> >base classes in a "parent" section.  What I want is to click on the
> >parent and go directly to the definition of the base class.  Tags?
> >Intellisense?  How do I do this?

> Hi,

>   At the simplest level, you can create a tags table, and just use
> M-. to go to the definition of what ever you want.

>   The intellisense question is answered here:
>   http://cedet.sourceforge.net/intellisense.shtml

>   The rest of my answer is mostly for Klaus since it gets into how
> Semantic (the parser that understands all the C++ mumbo-jumbo) works.

>   First, there is some code that will scan all the files that have
> already been loaded into Emacs and form an organized class hierarchy
> so you can jump between files.  Speedbar uses this to create an
> ordered tree of the entire set of class hierarchies for a given
> project.  It doesn't auto-refresh, but that can be fixed.

>   Second, if semanticdb is enabled, and you have a meta-tag
> representation (a tag describing a tag you don't actually have a
> pointer to at the moment.) you can find it with semanticdb.  The CVS
> version of semantic happens to have a special search routine for
> finding a 'class' with a given 'name' too.

> Eric
> --
> Eric Ludlam             "Photonic Doodler"    The MathWorks x 7556



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
 
 
 

ECB

Post by Kai Gro?joha » Fri, 11 Jul 2003 16:49:28



> Thanks, Eric.  I already use etags... just thought semantic might be better
> or easier to use.  I'm looking for a nice, simple class broswer for C++.

For C++, ebrowse which comes with Emacs 21 might be a solution.  I've
never used it, though.
--
~/.signature
 
 
 

ECB

Post by Eric Ludla » Sat, 12 Jul 2003 22:32:43



>Thanks, Eric.  I already use etags... just thought semantic might be better
>or easier to use.  I'm looking for a nice, simple class broswer for C++.

If you use speedbar in conjunction with semantic, you can use
`speedbar-change-initial-expansion-list' (or the context menu) to turn
on the class browser.  It will think for a moment or two, then list
all the major data types in an inheritance expandable view.

Quote:>Semantic almost works but it should have something to generate all the cache
>files without having to visit each file (my source tree has a few thousand
>files).  Also, when I turn on the global auto-parse mode, emacs tends to

Scripts like this are available in semantic 2.0 (CVS only right now).
They are a bit pokey, which is why I had not back ported them to 1.4.

Quote:>freak out a bit and parse the same file over and over (about every 5
>seconds) even though the file is read-only and not being modified.

This I am unfamiliar with.  It should not need to reparse unless there
was a critical failure during the first parse that makes it think it
needs to parse the file again.  It could require some debugging to
figure out why.

I examine read-only files frequently and have not encountered this.

There is also oo-browser which is on sourceforge somewhere, and
Xrefactory, which is commercial.

Good Luck
Eric