It would be great to eventually implement all the great refactoring tools Netbeans provides. One of the more important features is the "introduce method" refactoring: http://wiki.netbeans.org/Refactoring#Replace_block_of_code_with_a_method
VS Code just added this for typescript, which maybe provides some reusability: https://code.visualstudio.com/updates/v1_16#_javascript-and-typescript-refactorings
@fbricon This is exactly I planned to do after the code action after exception. Would like to implement this.
https://github.com/eclipse/eclipse.jdt.ls/pull/381 looking promising :

The feature has been added in 0.12.0, but we still need to improve it by chaining the refactoring with a rename action on the new method name. Currently, you have to manually trigger the rename action (eg. using F2 to rename the method).
Most helpful comment
https://github.com/eclipse/eclipse.jdt.ls/pull/381 looking promising :
