> No I don't think so! I have no inheritance!!!! Yes, sure. I think this could be done by "Extract Interface" and THEN "Replace Inheritance with Delegation".
> I haven't read the book "Refactoring" yet, but I will. However I don't > think you should follow this publication as religiously as you seem to. > > How about doing things that are intuitive and make sense, rather than > adhering to a "standard" invented by a single person's book? What?? That we don't do absolutely! We are far from religious following any publication related refactorings. Instead, we try to figure out a set of convinient refactoring methods that can be implemented in IDEA to simplify and automate the real process of refactoring code. As for Martin Fowler's "Refactoring" book, it's a really great work and many (but not all!) of the refactorings described there are good candidates to be implemented in a refactoring tool. We implemented many of refactorings described there plus a few other refactorings that we find useful. In future, we plan to add more refactorings. Some of them are ones from the refactoring book, some are not. Even for refactorings from the book, we don't always implement them in the exactly described form. For example, we don't think that "Replace Inheritance with Delegation" in the form described by Martin Fowler is pretty much useful. Instead, we plan to implement another form of this refactoring. > I didn't even consciously realise I was converting to delegation until I > had to describe this problem - we don't always understand our own genius > until after the fact ;-) As you said: "I am using aggregation in the interfaces, instead of inheritance. i.e. I also added a getExtractedInterface() method to the source interface." this is exactly what is named "delegation". You delegate some functionality to another class/interface. > So, with these convoluted complicated names for > features, people may not understand them unless they have read this book. Well, we should have at least some names. If there is no pretty obvious name, it's better to use name from the book, then it will be familar to at least some people.. > (In which case I hope you are getting royalties on sales) We don't. > > For example, the current "Introduce Field" is counter-intuitive to me > personally. Any normal person I think will assume from the name that this > means you can highlight an undefined variable or an expression and > convert it to a field of the class. Not so. I still can't work out how > that feature works. Yes, it actually works in this way. Just select an expression in code and invoke "Introduce Field" to create a new field initialized by this expression. Pretty similar to "Introduce Variable". Doesn't it work for you? > Yes I've been told that it works according to the > book's description of that refactoring, but what use is that to me? That > doesn't make it intuitive. AFAIK, there is no such refactoring in Martin Fowler's book. 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 8:57 PM 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. > > No I don't think so! I have no inheritance!!!! > > I only have inheritance AFTER using "extract interface". IDEA is causing > it! Please look at my example again. > > I don't want inheritance! Extract interface is always adding "extends > NEWINTERFACENAME" when this should just be optional as sometimes you want > to create a distinct interface using parts of another. > > I haven't read the book "Refactoring" yet, but I will. However I don't > think you should follow this publication as religiously as you seem to. > > How about doing things that are intuitive and make sense, rather than > adhering to a "standard" invented by a single person's book? > > I didn't even consciously realise I was converting to delegation until I > had to describe this problem - we don't always understand our own genius > until after the fact ;-) So, with these convoluted complicated names for > features, people may not understand them unless they have read this book. > (In which case I hope you are getting royalties on sales) > > For example, the current "Introduce Field" is counter-intuitive to me > personally. Any normal person I think will assume from the name that this > means you can highlight an undefined variable or an expression and > convert it to a field of the class. Not so. I still can't work out how > that feature works. Yes I've been told that it works according to the > book's description of that refactoring, but what use is that to me? That > doesn't make it intuitive. > > So, for new undefined variables (usually class "constants") I have to > CTRL+V to make local variable and then Convert Local to Field... to do > what I think Introduce Field should do, judging by its name. > > $0.02 > > 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
