Re: I released the refactoring tool

Tu Do <[email protected]> Mon, 16 Feb 2015 01:09:49 +0700
Newsgroups gmane.emacs.cedet
Message-ID <CAOEd9j=8gY34MG-9VTQ8vGTj=vohv7595_Kk_6r59A+gV1UGow@mail.gmail.com>
Hi Eric,

Thanks for your fantastic work. Yes, I would love to reuse
srecode-semantic-insert-tag when possible, since it's more portable for
other languages and I will do less work if it works.

I tried all your patches and it works fine. The performance is good. It's
about 3 seconds for me after running srf-src-run-tests:

Elapsed Time Srecode: 2.853736
Elapsed Time Gold: 2.964381

Currently, I don't have any test suite. I planned to do it after I finish
the TODOs on the homepage.

I noticed that when selecting a file to generate into, I couldn't complete
> on file names that already exist.  I suspect this is because I don't use
> projectile?
>

Srefactor does not depend on Projectile, but support when it's available.
When Projectile is installed, Srefactor can get files of a project with the
function projectile-current-project-files: an option "(Project File)" is
available to select an arbitrary file in your project to insert tag, and
the option "(Other file)" that uses the function projectile-get-other-files
to get a list of other files . When Projectile is unavailable, Srefactor
simply removes option "(Project file)" and for the option "(Other file)",
Srefactor uses ff-find-other-file to open other file (create new if not
exist), though limited to current directory and directories defined in
ff-other-file-alist.

You can check the function srefactor--refactor-based-on-tag-class to see
how file is handled. After a user select an action, a file option is passed
into the function and the function selects a file based on that option.

Regards,

Tu.

On Sun, Feb 15, 2015 at 11:27 PM, Eric Ludlam <[email protected]> wrote:

> Hi Tu,
>
> I've started digging into srefactor to see how I can help.  Refactoring
> tools were always my end goal for CEDET so I'd love to see this become
> successful.
>
> Do you have any automated or semi-automated tests?  I was going to add
> some based on your pastebin so I could figure out what the problems with
> SRecode is.  I also wanted to make SRecode optional in srefactor so it
> would be easier to start building toward using it.
>
> I noticed that when selecting a file to generate into, I couldn't complete
> on file names that already exist.  I suspect this is because I don't use
> projectile?
>
> Once I got the basic use of SRecode working, I found that the performance
> was very similar (perceptually).  After getting a simple unit test
> framework up and running, here are my timing results:
>
> Elapsed Time Srecode: 1.030428
> Elapsed Time Gold: 0.801937
>
> so very close.
>
> While adapting for SRecode, I only updated the item for
> function-implementation, figuring I could start small.  I really like your
> notion for initial content based on return type.  Very nice.  You also
> identified that there is no utility in semantic for calculating a fully
> qualified name.  There are some one-offs around, so this seems like
> something to improve in semantic.
>
> I've attached a bunch of patches for what I was able to assemble.  A
> couple might be handy for you the rest is to just share what I'm up to.
>
> Note that the "test" doesn't actually have tests that check anything. It
> just batch runs the utility.  There are a bunch of utilities in the CEDET
> test suite for checking one batch of tags against another that would be
> more helpful here.  The CEDET suite will insert a bunch of tags, then parse
> the buffer, and make sure the end result is the same. For now I was just
> checking the output to see what I need to fix in srecode.
>
> I hope this helps.
> Eric
>
>

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/

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