On 02/05/2010 12:36 AM, nilitonilito nilitonilito wrote:
> I'm wondering if CEDET can refactor code, in the sense of renaming a
> class declaration and automatically renaming all class uses across the
> code, or even harder renaming a method (because it more amendable to
> ambiguities). I've read on a forum that although CEDET has no such
> function it has everything one needs to implement it, which makes sense
> since it can do smart jump. Anyway I don't have yet the understanding
> that allow me to code that function by myself (though I'll probably give
> it a try eventually if nobody attempts that). So my question is, what is
> the status of such refactoring function?
CEDET is going through a bit of an organizational transition, which has
put pause to most of my feature hacking, so I'll answer this question ^^
and that question vv at the same time.
> My second question is, I've seen a bunch of CEDET related files in emacs
> dev source code. I asked on the emacs IRC channel if that means CEDET is
> now part of emacs but got no straight answers. So I've tried to disable
> loading cedet in my .emacs but got errors, like "Symbol's function
> definition is void: semantic-load-enable-code-helpers". Again what is
> the status?
CEDET was merged into the Emacs bzr repository last year after 23.1 was
released. In order to be a part of Emacs, it needed to conform to 8.3
file name conventions as there are still important DOS file system users
out there. As such, all the file names are different.
This came about while I was trying to push out a CEDET 1.0, where I
wanted something stable that could stand for a couple years while I
worked out the kinks of the next feature set which would necessarily
break old interfaces.
Now I'm trying to stabilize 1.0 for Emacses at 23.1 revision or older so
I can swap my files names all over to match Emacs.
Sadly, I can't just move to Emacs bzr hacking because of the nature of
the releases I get from my work to provide code into Emacs, so I need to
continue maintaining a separate repository.
As far as refactoring, that is distinctly something I would tackle after
CEDET 1.0, as I have a hard enough time getting motivated to do
interactive distribution testing without having something else fun to
work on nearby.
The more recent tools srecode ( template / code generator ) and COGRE (a
UML diagram editor) and the semantic-symref API are all at the beginning
of paths I was building to do a refactoring editor in Emacs.
For very small refactorings, there is a neat mode called
'semantic-idle-tag-highlight' which does a smart highlight for all
variables that are exactly the same (including by class on method). All
it is missing is some sort of "rename" feature. For that, there is an
srecode field editing feature I started on, but haven't had time to make
One of my many plans was to pull out the core of each and make it
generic enough to combine into new things, such as a quick-rename
feature for things used in small scopes.
Anyway, I will continue to plug away at fixing reported issues and
building up my test suite to get another release out. If someone feels
the need to tackle one of these problems, and can provide release papers
to the FSF, I'll be happy to guide you through some of my thoughts on