Re: Refactoring wishlist

Danny Dig <[email protected]> Wed, 21 Sep 2011 00:06:16 -0500
Newsgroups gmane.comp.programming.refactoring
Message-ID <CADiYQu7FNmSj1T4oBMq-hM=1t-8+2vdUwTDxLsNbAPVMAAL3Yw@mail.gmail.com>
Josh - finally I get some answers that are directly useful for my class
projects. People who suggest things need to understand the scope of the
project -- one semester project (more precisely, 2-month project). Things
like changing the Eclipse refactoring workflow is certainly beyond our
scope.

On Tue, Sep 20, 2011 at 11:46 PM, Joshua Kerievsky <
[email protected]> wrote:
>
> Could a few of those students simply fix defects? As far as I know, the
> team working on Eclipse refactorings has been a skeleton crew for a few
> years now and the defects have been piling up. Eclipse refactorings never
> got fixed to work well with generics...and it sure would be nice to see
> that
> fixed.
>

I thought about fixing some of the bugs in existing refactorings, but this
requires extensive knowledge/expertise. I know bugs that have been open for
many years and won't be fixed because they require extensive changes to the
refactoring engine architecture.

Refactorings for generics are not perfect in Eclipse. Many people complain
that they end up doing the whole refactoring by hand. One possible
refactoring (suggested by John Brant) is to cleanup unnecessary casts from
code that has been "generified" by hand:

List<Foo> fooList = this.getList();
for (Iterator<Foo> i = fooList.iterator(); i.hasNext();) {
       Foo f = (Foo)i.next();
       ...
}

In this example, remove the unnecessary "(Foo)" cast.



> Beyond that, I'd love to have:
>
> * Safe Delete (as it is implemented in R#) e.g. if C inherits from B which
> inherits from A and you safe delete B, C inherits from A -- there are other
> examples that don't involve inheritance.
>

this is a good one. I should look at more examples.



> * Replace Type Code with Class (
> http://industriallogic.com/xp/refactoring/typeCodeWithClass.html)
>
> * Extract Class -- improve the implementation to allow for extracting
> methods
>
> * Compose Method - provide a way to produce a composed method in one shot
> by
> letting the user specify the diving lines between the chunks of code that
> need to be extracted into new method.
>
> ...More coming.... too tired right now to think of all the refactorings on
> my wish list.
>

Send more ideas our way. I don't guarantee that we will implement all of
them, but I guarantee that we won't implement them if you don't tell us.

thanks,
Danny


-- 
Danny Dig's homepage: http://netfiles.uiuc.edu/dig/www

Motto: "Success is not for the chosen few but for the few who choose"


[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/refactoring/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/refactoring/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/