Ok, so I've been searching for tools to help me work faster, after recently discovering having >2 monitors and GUI based debugging, I feel like I've been doing things the "hard" way and want to eliminate as much redundancy in my work habits.
What I'm looking for is tools to help me visualize my object hierarchy, and identify areas that need re factoring according to some of these methods here:
http://www.refactoring.com/catalog/index.html
Being able to automatically extract duplicate code into functions, rename objects, reorder parameter orders etc.. would be a plus. Is there anything like this that comes close for PHP? Is there a tool for another language that will do this?
So far the closest things I found was PHPdocumenter, smalltalk and eclipse for java... there has to be something, even if it is limited in functionality. File find and replace is a huge pain
Automated refactoring tools
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Automated refactoring tools
I have not found anything when I have occasionally searched. What did you find in PHPdocumenter? I have read some code metrics projects for PHP ... those might be the basis of refactoring.
(#10850)
Re: Automated refactoring tools
PHPdocumenter doesn't do anything my IDE doesn't already do..
http://www.phpcompiler.org/spinoffs/#refactoring this looks promising,
I emailed another company that has written re factoring tools for a bunch of other languages and said they'd be willing to port it..
I mean if I could highlight a variable and rename it in 1000 places without having to write a regex find and replace each time, and highlight code and have it automatically create a method and update any place in the application where that same code appeared, those 2 features right there could probably cut a ton of time off development, I've heard eclipse does it.. for java
http://www.phpcompiler.org/spinoffs/#refactoring this looks promising,
I emailed another company that has written re factoring tools for a bunch of other languages and said they'd be willing to port it..
I mean if I could highlight a variable and rename it in 1000 places without having to write a regex find and replace each time, and highlight code and have it automatically create a method and update any place in the application where that same code appeared, those 2 features right there could probably cut a ton of time off development, I've heard eclipse does it.. for java
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Automated refactoring tools
Eclipse has some refactoring tools in it. I've only just started playing around with it so I've not tried them yet.
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Re: Automated refactoring tools
NetBeans has alot of refactoring tools for Java. It also has a PHP plug-in. I've not tried the refactoring options with the PHP plug-in though, I guess it won't work but it's probably worth a try.
Re: Automated refactoring tools
For metrics you could use PHPUnit or PEAR's PHP_CodeSniffer. They don't have any tools to perform refactoring though.
Re: Automated refactoring tools
The metrics tools will help prioritize problem areas more efficiently, thanks