Actually, what I think he's wanting to do could be accomplished relatively
easily (for the end user) if the "Move" refactoring worked on non-static
methods.

This example, however, shows some of the difficulty with the implementation
of that refactoring. If you move the method from one interface to another,
you would have to list the classes that implemented the one interface and
ask whether you should have them implement the new one. That gets much
trickier if you do a move from one class to another. Then there is no way
for IDEA to completely automate the process because while you can implement
more than one interface you cannot inherit from more than one base class.
IDEA would have to basically just inform the user that those classes were
effected. I believe the reason that non-static moving of members is not
included yet is because the fine folks at IntelliJ are trying to come up
with more intelligent solutions to these kinds of situations.  ;-)


~Mike

----- Original Message -----
From: "Valentin Kipiatkov" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 19, 2001 7:10 AM
Subject: Re: [Eap-list] Extract interface... issue


> I see. This is another refactoring. It seems to be something like "Replace
> Inheritance with Delagation". It's not supported yet, but we plan to
> implement it in some near future.
>
> Best regards,
> Valentin Kipiatkov
> -----------------------------------------------------------
>  IntelliJ Software, http://www.intellij.com/
>  "Develop with pleasure"
> -----------------------------------------------------------
>
> ----- Original Message -----
> From: "Wangjammer5" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, December 19, 2001 3:29 PM
> Subject: Re: [Eap-list] Extract interface... issue
>
>
> >
> > > > So, a new option:
> > > >
> > > > [ ] Make this class/interface extend/implement this extracted
> interface
> > > >
> > > > I would have thought that by default it should be "off", but maybe
> that's
> > > > just me!
> >
> > > There are entries at the top of the list of members to be extracted
for
> > all
> > > interfaces that your interface extends. By selecting them you choose
to
> > > "extract" these extends too. Does it work for you?
> >
> > No. I think you misunderstood my problem slightly.
> >
> > Before Extract interface:
> >
> > public interface MyInterface
> > {
> >  ...
> > }
> >
> > After Extract interface to a new i/f called "ExtractedInterface":
> >
> > public interface MyInterface extends ExtractedInterface
> > {
> >  ...
> > }
> >
> > ...this is not always what you want. I was creating a NEW interface from
> > methods in the source interface, but there was no "is a" relationship
> > between the two.
> >
> > i.e. my desired result was just to take methods out of the interface
into
> > a new one, and not change the "extends" of the source interface at all.
> >
> > I am using aggregation in the interfaces, instead of inheritance. i.e. I
> > also added a getExtractedInterface() method to the source interface.
> >
> > Cheers
> >
> >
> >
> > _______________________________________________
> > Eap-list mailing list
> > [EMAIL PROTECTED]
> > http://www.intellij.com/mailman/listinfo/eap-list
>
>
> _______________________________________________
> Eap-list mailing list
> [EMAIL PROTECTED]
> http://www.intellij.com/mailman/listinfo/eap-list
>


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

Reply via email to