Hi,

Here's the list of changes:

Hammer beta 20171012

  • Contains the fix for the memory leak I introduced in the previous build
  • New Refactor method Method Extraction, not finished!
  • Fix saving newly created file did not save, but instead tried to print (weird)


Yip, there's new goodies, thanks to Marco for partly sponsoring making it and suggesting on what to make.
A new refactor option called "method extraction".
It ISN"T done yet and it might take a while before I'm happy about it, but let me show you how it roughly works.

First you select some text in a method:
Click image for larger version. 

Name:	TH3MethodExtract1.png 
Views:	32 
Size:	37.6 KB 
ID:	11385

Here I pick an example in the order entry example.

Then from the menu select -> Source -> Code refactoring -> Method Extract and you'll get this screen:
Click image for larger version. 

Name:	TH3MethodExtract2.png 
Views:	32 
Size:	43.2 KB 
ID:	11386
You can change the method name and press the update button and it will adjust the text.
You cannot edit the text here.. The reason is that part of it is generated and if I let you edit it then the generated parts will overwrite your edits.
You can however select all and copy the text.
If you press cancel here, nothing happened.

If you press OK you get this:
Click image for larger version. 

Name:	TH3MethodExtract3.png 
Views:	29 
Size:	24.2 KB 
ID:	11387

Here you'll see that the method was extracted. Now you'll notice a few things that aren't done yet (ack!)

I need to re-indent, take the comments into account, actually call the method and well.. more much much more.
For example one of the current constraints is that at the moment it doesn't understand: global variables declared elsewhere, struct type variables, array type variables
It is really far from done.

But it is a start.
Oh and at this stage if you press "Undo" you're back to before you used the method extract function.

--
Wil