SlickEdit Community

Archived Beta Discussions => SlickEdit 201x Beta Discussions => SlickEdit 2014 v19 beta => Topic started by: flethuseo on October 08, 2014, 11:25:06 PM

Title: refactor-quick-extract-method appears to be broken
Post by: flethuseo on October 08, 2014, 11:25:06 PM
The above mentioned command seems to be broken for C/C++, when I use the command on a selected piece of code (with line selection) the method is extracted correctly; but where the call should be, there is left over code from the extracted method that shouldn't be there. To make things even worse, the previous back up is completely screwed up. So, I can't even get back to the original code. It's pretty much a harmful command right now.

2014-10-08_18-13-07.mp4 -- illustrates the bug when using "quick extract..."

ExtractMethodBug.mp4 -- illustrates the bug when trying to go back with backup tool.

I'm also sending you the project so you can try to reproduce the problem over there. It's a visual studio 2010 project.
Title: Re: refactor-quick-extract-method appears to be broken
Post by: Dennis on October 09, 2014, 12:25:57 AM
Were you not able to use the multi-file undo to back out the change ?
Title: Re: refactor-quick-extract-method appears to be broken
Post by: flethuseo on October 09, 2014, 02:34:07 PM
I couldn't I get this error message:

(http://s29.postimg.org/bf63a0tfb/2014_10_09_9_32_42.png)
Title: Re: refactor-quick-extract-method appears to be broken
Post by: Dennis on October 09, 2014, 08:36:17 PM
Quick extract method bug:  fixed
Multi-file undo bug: fixed

Thanks for reporting this one.  This bug has been around for a while.
Title: Re: refactor-quick-extract-method appears to be broken
Post by: flethuseo on October 09, 2014, 10:01:55 PM
Cool, Are there any plans for making refactor-extract-method work on C++? I've noticed it's disabled by default.

Title: Re: refactor-quick-extract-method appears to be broken
Post by: Dennis on October 09, 2014, 10:06:52 PM
The C++ refactoring has been disabled for a long time.  It turned out to be impossible to keep up with Visual Studio and gcc constantly adding new intrinsics to their language implementations and header files.  If you enable it you'll find that it works with most C++ code that doesn't use the STL and builds with Visual Studio 2003.

I also put another fix into refactor-quick-extract-method so that it would handle parameterizing local variables correctly.  That had gotten broken in a recent release.
Title: Re: refactor-quick-extract-method appears to be broken
Post by: flethuseo on October 09, 2014, 11:00:15 PM
Cool thanks.