Hi,
this is my first message to this list so sorry if this subject has been
discussed previously. Has anyone at JetBrains thought about a refactoring
nose that uses IntelliJ's database of methods, classes etc... to agressively
discover duplication in code? There is a discussion here:
http://www.xpdeveloper.com/cgi-bin/wiki.cgi?TheNose
I think discovering duplication in code is the next step in pushing the
envelope with Refactoring. Not just duplication in terms of simple text
(although it would be useful), but two pieces of code that don't "look" the
same but are infact the same. Eg.
say you have two interfaces like:
interface Person {
public String getName();
}
interface LongJumper extends Person {
public int getLongestJump();
}
then the two snippets:
private String getPersonName(int index){
Person Alfred = getPerson(index);
String temp = Alfred.getName();
return temp;
}
and
private String getLongJumperName(int index){
LongJumper Dave = getLongJumper(index);
String temp = Dave.getName();
return temp;
}
SMELL the same... which could mean they should be reduced to:
private String getPersonName(int index){
Person person = getPerson();
String temp = person.getName();
return temp;
}
It would be nice if there was a tool you could run to find this duplication
within intellij. Plus a load of stuff like show me all methods/classes etc.
with over X lines of code
Neil
**********************************************************************
This email is intended only for the addressee. This email
and any files transmitted with it may contain confidential
or privileged information. If you are not the named
addressee or the person responsible for delivering the
message to the named addressee, please contact
[EMAIL PROTECTED]
This email has been scanned by MIMEsweeper.
**********************************************************************
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://lists.jetbrains.com/mailman/listinfo/eap-features