Re: Refactoring Wish List
To jump into this discussion at a non-linear place, another useful addition to the jdee would be the ability to add custom javadoc tags for xdoclet. Xdoclet comes with a java gui tool for this (xdocletgui) which modifies the source files. It would be considerably easier to use in emacs if the functionality was directly available. The rules for which tags are allowed when using a particular module are contained in xml files. Typically the conditions involve what kind of item you are commenting (class, method, or field, sometimes whether it is a getter/setter) and what other tags are present. I think in order to do this in elisp one would need an xml parser and a parsed version of the java file indicating what kind of element you are at and what javadoc tags are already present. So far I haven't tried doing any lisp programming (since about 1968) so I have no idea how practical this would be. Any advice? Thanks david jencks
RE: Refactoring Wish List
Yes, JDE lacks the find-usage option, and I think it would be a nice feature to have, its not high on my priority list though, as Paul Kinnucan pointed out the find-expression can be used as a substitute. I don't understand the fuss about it - maybe it because emacs/jde doesn't support it that its important for the Idea users !? :-). Look at the problem this way - Idea is just a simple GUI implementation of emacs/jde which lacks a lot of the powers in emacs(/jde), and then it might have some nice-to-have features lacking in jde. For my own experience I think if a feature is needed by enough then it will be implemented, and if you are the only one interested in it then you can do it yourself :-); - that's another important power of emacs/jde!!! You can modify it to extreme for you own personal needs, you can not do that with Idea or any other IDE for that matter. Generally I think people not using emacs are very aggressive against emacs, but I think its because they have never understood the power of emacs because they have never found out how they should use emacs. Basically I think this issue relates to the old problem of bringing computers out to the masses - that problem was resolved with GUI because it looked more appealing to people and hence appeared easier to understand. Anyway, I just read a lot of the jdee installer mail from [EMAIL PROTECTED] and most of them say what I was about to say. Sincerely Henrik Kjær -Original Message- From: Sebastian Hauer [mailto:[EMAIL PROTECTED]] Sent: 4. december 2002 19:51 To: Henrik Kjær Cc: [EMAIL PROTECTED] Subject: RE: Refactoring Wish List Hi Henrik, -Original Message- From: Henrik Kjær [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 04, 2002 2:23 AM To: Sebastian Hauer Cc: [EMAIL PROTECTED] Subject: RE: Refactoring Wish List Hey, you are talking about emacs - behave! :-) I'm so sorry - emacs rules :) Here is ten good reasons why you shouldn't give up emacs/jde for Idea :-) http://www.devx.com/free/hotlinks/2002/ednote050102/ednote050102-1.asp Thanks for the link. I will use it wisely, hehehe... Never will I doubt the many advantages emacs has to offer to software development. :) OK let's get real. Many developers want it very simple and do as much with a mouse click and without their brain as possible. They will never switch to emacs. Though my problem is that I like emacs a lot and I have been developing on it ever since I discovered Unix. Now I am again stuck on Windows and even on this unfriendly OS I can use my emacs. But now I am forced fighting a never ending corporate war of pro full IDE users. And with IDEA they have a dangerous weapon against me. Now all my regular expression power is worthless once they do their Ctr+Right-Click [find usage] on class, method and variable names. OK ok it sounds a little over dramatic but this is more or less how it is. Though I really appreciate the efforts right now made to bring refactoring and other cool new features into JDE and emacs and I look forward trying them. Regards, Sebastian
Re: Refactoring Wish List
There is one aspect of changing/deleting class names that is not obvious: Version Control. I wonder, should refactoring get implemented, whether work would be done to try to integrate with VC (cvs, rcs, p4, ...) Having a tool to rename and delete files won't be good enough for some VC systems (e.g. p4 integrate). Just a thought, greg_fenton. = Greg Fenton [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
Re: Refactoring Wish List
Hi Just a suggestion to look at this. I haven't a lot of time to examine the list, but a number of them are in JRefactory (http://jrefactory.sourceforge.net/) which has on the Requested Features list to integrate to JDEE. I haven't used JRefactory but came across it some time ago and bookmarked it. Bill At 18:22 02/12/2002 -0500, Nascif Abousalh-Neto wrote: So far we have: 1. Changing class name (and all references). 2. Changing names of any choosen class member - field, method (and all references) 3. Changing package for one or more classes with 'one click' (and all references) 4. Moving class to different package 5. Create factory method in place of constructor 6. Extract method from selected piece of code 7. Extract super class or interface for selected piece of code and set of fields 8. Deleting classes/methods/attributes 9. Copying classes into other packages 10.Copying methods/attributes into other classes I would like to see some features from Transmogrify, which may not be necessarily refactorings but are easy to implement once you have a refactoring framework (which requires the complete syntax trees plus reference resolution) in place: 11. Wrapping a block of code in a try/catch (exceptions needed extracted from the signatures of the methods in the block) 12. Finding out unsused variables/methods/classes 13. Finding out shadowed variables/methods Maybe we should have a page somewhere and vote? A system like bugzilla to track requirements/bugs and get user input on the most desirable ones would be nice. For a comprehensive list of Refactorings as documented by Martin Fowler, check http://www.refactoring.com/catalog/index.htmlhttp://www.refactoring.com/catalog/index.html Regards, Nascif
RE: Refactoring Wish List
Sebastian Hauer writes: Not exactly refactoring but unbelievably useful. Find the usage of a variable or method name. If JDEE or some other free emacs mode is able to provide this feature please let me know. Have you tried the JDEE's Find Expression command. It displays every instance of an expression that it finds on the current source path in a buffer. Clicking on an instance opens the corresponding source file to the place where the expression occurs. I use this feature to find every reference to a method or variable name. Of course, an intelligent find method that differentiates between ClassA.method() and ClassB.method() would be better and I hope that the JDEE will evantually provide this capability. - Paul
RE: Refactoring Wish List
Hi Paul, -Original Message- From: Paul Kinnucan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 10:55 AM To: Sebastian Hauer Cc: [EMAIL PROTECTED] Subject: RE: Refactoring Wish List Sebastian Hauer writes: Not exactly refactoring but unbelievably useful. Find the usage of a variable or method name. If JDEE or some other free emacs mode is able to provide this feature please let me know. Have you tried the JDEE's Find Expression command. It displays every instance of an expression that it finds on the current source path in a buffer. Clicking on an instance No I did not try this until now. But it does a simple find /src -name *.java -type f | xargs grep -i -n Expression only something that I did anyway from the command line. I have to admit having the file name in the search buffer is nice though. method or variable name. Of course, an intelligent find method that differentiates between ClassA.method() and ClassB.method() would be better and I hope that the JDEE will evantually provide this capability. Well yes this is more what I was looking for. I like JDE but I kind of need this feature. All my co workers are already working on InteliJ IDEA but I don't want to give up emacs so I had to install the shareware tool xref which does a good job but is of cause not integrated with JDE and some refactoring stuff takes unbelievably long compared to IDEA. Sebastian
Re: Refactoring Wish List
On Mon, 2 Dec 2002, [EMAIL PROTECTED] wrote: Maybe we should have a page somewhere and vote? A system like bugzilla to track requirements/bugs and get user input on the most desirable ones would be nice. Maybe the wiki? -- Galen Boyer
RE: Refactoring Wish List
Title: Message Not exactly refactoring but unbelievably useful. Find the usage ofa variable or method name. If JDEE or some other free emacs mode is able to provide this feature please let me know. Regards, Sebastian -Original Message-From: Nascif Abousalh-Neto [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 6:23 PMTo: [EMAIL PROTECTED]Subject: Refactoring Wish List So far we have: 1. Changing class name (and all references). 2. Changing names of any choosen class member - field, method (and all references) 3. Changing package for one or more classes with 'one click' (and all references) 4. Moving class to different package 5. Create factory method in place of constructor 6. Extract method from selected piece of code 7. Extract super class or interface for selected piece of code and set of fields 8. Deleting classes/methods/attributes 9. Copying classes into other packages 10.Copying methods/attributes into other classes I would like to see some features from Transmogrify, which may not be necessarily refactorings but are easy to implement once you have a refactoring framework (which requires the complete syntax trees plus reference resolution) in place: 11. Wrapping a block of code in a try/catch (exceptions needed extracted from the signatures of the methods in the block) 12. Finding out unsused variables/methods/classes 13. Finding out shadowed variables/methods Maybe we should have a page somewhere and vote? A system like bugzilla to track requirements/bugs and get user input on the most desirable ones would be nice. For a comprehensive list of Refactorings as documented by Martin Fowler, check http://www.refactoring.com/catalog/index.html Regards, Nascif
Re: Refactoring Wish List
It's there now, but the code is pretty alpha in my opinion. I think it should stabilize in the next few weeks. Sebastian Hauer [EMAIL PROTECTED] writes: Not exactly refactoring but unbelievably useful. Find the usage of a variable or method name. If JDEE or some other free emacs mode is able to provide this feature please let me know. Regards, Sebastian -Original Message- From: Nascif Abousalh-Neto [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 6:23 PM To: [EMAIL PROTECTED] Subject: Refactoring Wish List So far we have: 1. Changing class name (and all references). 2. Changing names of any choosen class member - field, method (and all references) 3. Changing package for one or more classes with 'one click' (and all references) 4. Moving class to different package 5. Create factory method in place of constructor 6. Extract method from selected piece of code 7. Extract super class or interface for selected piece of code and set of fields 8. Deleting classes/methods/attributes 9. Copying classes into other packages 10.Copying methods/attributes into other classes I would like to see some features from Transmogrify, which may not be necessarily refactorings but are easy to implement once you have a refactoring framework (which requires the complete syntax trees plus reference resolution) in place: 11. Wrapping a block of code in a try/catch (exceptions needed extracted from the signatures of the methods in the block) 12. Finding out unsused variables/methods/classes 13. Finding out shadowed variables/methods Maybe we should have a page somewhere and vote? A system like bugzilla to track requirements/bugs and get user input on the most desirable ones would be nice. For a comprehensive list of Refactorings as documented by Martin Fowler, check http://www.refactoring.com/catalog/index.html http://www.refactoring.com/catalog/index.html Regards, Nascif