Hi;
Can anyone advise on a (low cost or freeware) refactoring tool?
I don't mind if its stand-alone, or a plugin to netbeans or jEdit?
It might even make me switch my main coding environment.
I have tried IDEA ide, but am not ready to purchase it. Have also tried
reFactorIt! plug-in for Netbeans, and again am not ready to spend $295 just for
this, as great as it is.
Thanks
-nat
Robert Klemme - 31 Oct 2003 09:37 GMT
> Hi;
>
[quoted text clipped - 6 lines]
> reFactorIt! plug-in for Netbeans, and again am not ready to spend $295 just for
> this, as great as it is.
Eclipse.
robert
Jon Skeet - 31 Oct 2003 09:38 GMT
> Can anyone advise on a (low cost or freeware) refactoring tool?
> I don't mind if its stand-alone, or a plugin to netbeans or jEdit?
[quoted text clipped - 4 lines]
> reFactorIt! plug-in for Netbeans, and again am not ready to spend $295 just for
> this, as great as it is.
Give Eclipse a try - it's free and has good refactoring support.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
natG - 31 Oct 2003 19:19 GMT
[To whom it might concern. I suspect many are in the same boat...]
I have looked at Eclipse (wasn't aware about its refactoring features) but I gave
up on it since it seemed so radically different conceptually than a typical
IDE.( I wasn't going to invest hours of learning yet-another-ide, just becuase it
*might* become *the* environment I was looking for.) For example, after using
jDeveloper for about a year, I took a shot at Netbeans and was productive within a
day (say about 8-12 hours). After using Netbeans for many months, I tried IDEA
(since I have practically given up on gui tools, or maybe I became professional
enough to code everything 'manually') and was really intrigued with its
usefullness, and was able to utilize it's features within one hour of download.
(Alas, right now I'm short on cash...)
But when I looked at Eclipse it seemed like at least a week will elapse before I
'code for real' with it. Maybe its due to a different approach, or maybe I was
just tired and lazy when examining it.
Now, I don't mind a week investment if I know that I will be happy with this tool
for quite a while...
Your opinions are most welcome. (Might not respond until late Sunday/Monday.)
Thanks
-nat
Tambu Tangban - 01 Nov 2003 06:06 GMT
I agree with your take on Eclipse but Eclipse rules! After the initial
investment in learning the environment you will be very happy with it.
> [To whom it might concern. I suspect many are in the same boat...]
>
[quoted text clipped - 18 lines]
> Thanks
> -nat
natG - 02 Nov 2003 17:34 GMT
Is refactoring built-in and is it as thorough as reFactorIt!?
thanks
Robert Klemme - 03 Nov 2003 07:39 GMT
> Is refactoring built-in and is it as thorough as reFactorIt!?
Yes and don't know, because I don't know reFactorIt. But you can do a lot
including renaming of classes, packages, methods, inlining methods,
extracting methods.......
Regards
robert
natG - 03 Nov 2003 16:38 GMT
Thank you all. I might give I might give Eclipse another "go".
Does t have an automated (or easy) way to import Netbeans projects?
thanks
-nat
Robert Klemme - 04 Nov 2003 10:50 GMT
> Thank you all. I might give I might give Eclipse another "go".
> Does t have an automated (or easy) way to import Netbeans projects?
AFAIK no.
robert
Michael Holtermann - 04 Nov 2003 11:11 GMT
"natG" <natgross@easy-management-systems.com> wrote on 03 Nov 2003:
> Thank you all. I might give I might give Eclipse another "go".
> Does t have an automated (or easy) way to import Netbeans projects?
It's tricky, especially if you have a folder for sources and another one
for classes... But you can create a new project in eclipse and add your
sources-folder to this project (with the wizard).
You should have a backup available, 'cause it's possible that eclipse
removes folders that don't contain sources. In this case you have to
restore these folders from your backup.
HTH, Michael.
Robert Klemme - 04 Nov 2003 12:20 GMT
> "natG" <natgross@easy-management-systems.com> wrote on 03 Nov 2003:
>
[quoted text clipped - 3 lines]
> It's tricky, especially if you have a folder for sources and another one
> for classes...
I've found that this is especially easy with eclipse.
> But you can create a new project in eclipse and add your
> sources-folder to this project (with the wizard).
Well, you have to create a new Eclipse project anyway. If you reuse an
existing project directory tree, you can easily set up which of the
folders are Java source folders and where the compiled classes go.
> You should have a backup available, 'cause it's possible that eclipse
> removes folders that don't contain sources. In this case you have to
> restore these folders from your backup.
Backup is always good, but I never experienced Eclipse removing folders
other than in the "bin" path.
Cheers
robert
natG - 04 Nov 2003 20:14 GMT
Thank you all. It seems doable. If I run into insurmountable problems I shall
start a new thread/topic.
-nat
Jim - 04 Nov 2003 20:35 GMT
Here's a naive question. What, formally, is 'refactoring'.
I'm familar with the term in a general sense as jargon for rearranging
and modifying a class heirarchy (or other code base) to make it more
appropriate to the task at hand. This ususally occurs after enough
experience has been gained with the task, or the task has mutated,
to make the original design not optimal.
The availability of tools for refactoring suggest there might be a formal
description and that refactoring is a well-defined concept to allow it to
be approached programatically.
Thanks in advance for enlightening me.
jim cant
> Hi;
>
[quoted text clipped - 9 lines]
> Thanks
> -nat
Kai Grossjohann - 04 Nov 2003 22:12 GMT
> The availability of tools for refactoring suggest there might be a formal
> description and that refactoring is a well-defined concept to allow it to
> be approached programatically.
I'm not an expert.
It seems that the word refactoring is used with two meanings. One
meaning is to describe the general activity that you described. (I
guess then refactoring is a verb.) Another meaning is to describe a
certain move that's part of the general activity. (I think that's a
noun, then.)
Several of these moves have been described in the famous book by
Martin Fowler. Amongst them are, encapsulating a field (using
getter/setter methods instead of directly accessing a member
variable), extracting some code from a method into another method, and
moving a method to a superclass.
So you can highlight a region of code and tell the refactoring tool to
extract that code into another method.
But there is no tool that will find the right code to be extracted
into another method.
Part of the general concept of refactoring is the idea that the
software gets "better" in some sense, but I don't think that there is
a formal definition of which programs are "better". So just applying
several moves one after the other doesn't necessarily mean that you're
refactoring.
Kai
Bent C Dalager - 04 Nov 2003 22:26 GMT
>Part of the general concept of refactoring is the idea that the
>software gets "better" in some sense, but I don't think that there is
>a formal definition of which programs are "better". So just applying
>several moves one after the other doesn't necessarily mean that you're
>refactoring.
Just to emphasize the truth of your statement: "Extract Method" and
"Inline Method" are opposite refactorings. Either one can be useful in
improving the code. Ditto for "Change Value to Reference" and "Change
Reference to Value". To expand upon the latter, Fowler's first words
about "Change Reference to Value" is:
"As with Change Value to Reference (...), the decision between a
reference and a value object is not always clear. It is a decision
that often needs reversing."
Refactoring certainly isn't an exact science. :-)
Cheers
Bent D

Signature
Bent Dalager - bcd@pvv.org - http://www.pvv.org/~bcd
powered by emacs
Ville Oikarinen - 07 Nov 2003 11:58 GMT
> Part of the general concept of refactoring is the idea that the
> software gets "better" in some sense, but I don't think that there is
> a formal definition of which programs are "better". So just applying
> several moves one after the other doesn't necessarily mean that you're
> refactoring.
If you apply refactoring rules, you are refactoring. It's a completely different
question whether you are refactoring wisely.
Ville Oikarinen
natG - 05 Nov 2003 15:31 GMT
Jim;
http://www.refactoring.com/ should answer all your question and then some.
That page has many links to material at all levels.
Cheers;
-nat
P.Hill - 07 Nov 2003 18:23 GMT
> I'm familar with the term in a general sense as jargon for rearranging
> and modifying a class heirarchy (or other code base) to make it more
> appropriate to the task at hand. This ususally occurs after enough
> experience has been gained with the task, or the task has mutated,
> to make the original design not optimal.
To return to Jim's original definition, if we just ignore the
idea about 'appropriate to the task at hand' and just assume that
refactoring is looking more locally and say 'to make some part of the
code clearer' allows for the possible conflict between opposing
refactorings. One part of the code may become clearer while another
may become less clear.
-Paul