Author Topic: refactor-quick-extract-method appears to be broken  (Read 1591 times)

flethuseo

  • Senior Community Member
  • Posts: 177
  • Hero Points: 2
refactor-quick-extract-method appears to be broken
« 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.
« Last Edit: October 08, 2014, 11:27:41 pm by flethuseo »

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2633
  • Hero Points: 406
Re: refactor-quick-extract-method appears to be broken
« Reply #1 on: October 09, 2014, 12:25:57 am »
Were you not able to use the multi-file undo to back out the change ?

flethuseo

  • Senior Community Member
  • Posts: 177
  • Hero Points: 2
Re: refactor-quick-extract-method appears to be broken
« Reply #2 on: October 09, 2014, 02:34:07 pm »
I couldn't I get this error message:


Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2633
  • Hero Points: 406
Re: refactor-quick-extract-method appears to be broken
« Reply #3 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.

flethuseo

  • Senior Community Member
  • Posts: 177
  • Hero Points: 2
Re: refactor-quick-extract-method appears to be broken
« Reply #4 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.


Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2633
  • Hero Points: 406
Re: refactor-quick-extract-method appears to be broken
« Reply #5 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.

flethuseo

  • Senior Community Member
  • Posts: 177
  • Hero Points: 2
Re: refactor-quick-extract-method appears to be broken
« Reply #6 on: October 09, 2014, 11:00:15 pm »
Cool thanks.