Re: Fwd: I released the refactoring tool

Tu Do <[email protected]> Tue, 17 Feb 2015 22:47:48 +0700
Newsgroups gmane.emacs.cedet
Message-ID <CAOEd9jnuM6Xwc8e+G2Z+tqVOZCiTMdams9S7C70-m9hs8ZWQTQ@mail.gmail.com>
Well, CEDET is not that complicated to setup. It just needs better
documentation. To use CEDET, the only thing you need is to activate
Semantic:  (semantic-mode 1). Then, you will be able to use Semantic
related commands. You can enable additional features, such as
`semantic-stickyfunc-mode`; here is a demo:
http://i.stack.imgur.com/UBmjk.gif. Another feature is
semantic-idle-summary-mode, a demo:
http://tuhdo.github.io/static/func_args.jpg. What CEDET is struggling is to
have an up-to-date and accurate parser that can work on large project. It
has quite a good parser, as you can see in the refactoring demos, or [using
jump around in current buffer easily](
http://tuhdo.github.io/static/part3/helm-semantic-or-imenu.gif), but
because the limitation of Emacs Lisp engine, it can only do that much on
small scale. I tested Semantic with the Linux source tree, and it didn't
work; it could block Emacs for many minutes, if you want it to recursively
traverse every dependency. Semantic needs a fast and external indexer to
make it usable.

I planned to integrate Clang with Semantic (but David has a plan for it, so
I leave it to him). That is, using a fast and accurate parser from an
actual compiler to generate tags compatible with CEDET and CEDET doesn't
have to do the heavy lifting; it only needs to consume the processed
results, which should be fast even for large project like Linux kernel. You
can see such an integration example with GNU Global:
http://tuhdo.github.io/static/c-ide/helm-gtags-select.gif. In the demo, all
tags in the Linux kernel, generated by GNU Global, are accessible within
Emacs, instantly; you can jump to either definition or references. However,
GNU Global does not handle C++ really well, so Clang is targeted as long
term plan, not just for navigation but for refactoring. If you use Helm,
you can use helm-gtags: https://github.com/syohex/emacs-helm-gtags that is
really fast; if you don't use Helm, you can use ggtags:
https://github.com/leoliu/ggtags

On Tue, Feb 17, 2015 at 9:23 PM, LluĂ­s <[email protected]> wrote:

> David Engster writes:
> > Tu Do writes:
> [...]
> >> - Async: this alone is worth it.
> >> - Code querying with a popular and robust language. This will enable
> people to
> >> write small utilities using SQL, such as code metrics or statistics.
> With an
> >> actual database engine, we can do operation like searching for all
> functions
> >> that call current function, accurately; or all files that include a
> particular
> >> header files; or see all the included files that contain the
> definitions of
> >> tags in a current class; or simply creating a class index of a project
> (similar
> >> to what Ebrowse does, but for large index, it took Emacs really long to
> load
> >> all).... All of this can be delegated to a fast database engine. All we
> need is
> >> a properly designed database for tags.
>
> > I agree this all sounds nice. I'm skeptical because I wouldn't want to
> > see CEDET's complexity increased even further. Maintaining a second
> > database backend for Semantic would be a very big burden, and I feel
> > we're already struggling just keeping up with Emacs development and
> > maintaining the status quo. In my opinion, CEDET's main problem is not
> > that it cannot deal with large code bases, but that it's still not
> > reliable enough and too complicated to set up. This should not
> > discourage you from trying Sqlite, of course.
>
> I have not investigated the root, but while developing code for the Linux
> kernel
> or QEMU, I often have to disable many of semantic's features (all those
> appearing on the Development menu) or otherwise emacs eats up all my cpu.
> Also,
> sometimes I want to kill some large buffer to keep the semantic memory
> footprint
> low (it generated lots of tags, either directly or through includes), but
> I just
> cannot (I think semantic takes a lot of time to serialize its information
> to the
> disk).
>
> This is most probably fixable in CEDET without resorting to a new database
> backend, but I just wanted to make it "public" (although it's probably well
> known).
>
>
> Thanks,
>   Lluis
>
> --
>  "And it's much the same thing with knowledge, for whenever you learn
>  something new, the whole world becomes that much richer."
>  -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
>  Tollbooth
>

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk

_______________________________________________
Cedet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cedet-devel