> I notice in the project plan you have "generate delegate" code, however a
> very useful refactoring is the ability to extract a delegate. You have 
some
> methods that really are the responsibility of something else. This 
operation
> would let you select them and choose extract delegate - you are prompted 
for
> a name and that class is created with those methods. In the orginal class
> the methods are removed, a delegate instance variable is created and
> references to the moved methods are now dispatched via the new variable.

> This is cool but useful refactoring - its conceptually simple but a big 
time
> saver (and it would blow people away). If you get the IDE API done then 
we
> could write these kinds of things ourselves of course.

Yes, I've mentioned this before too. If a macro language / API was 
provided this could be done by gluing multiple smaller refactorings together.

I personally would think it should be a simple variant of the Extract 
superclass... refactoring, and that it should really be an option of 
that, but it would require a name change i.e. "Extract class..." with 
options for "Extract to a superclass" and "Delegate to extracted class".

Regards
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ W<A> ~~~~~
(o) Wangjammer5 (Marc Palmer) 
( ) Wangjammer7 

www.wangjammers.org = Java Consultants (Web|Smartcards|Crypto)



_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-features

Reply via email to