extract method ignores decorators
Brought to you by:
fabioz
If I use the "extract method" refactoring on some code in a function with a decorator, with the option selected to insert the code before the current method (the
default), the refactoring puts the extracted function in between the decorator and its existing function instead of before the decorator.
Version: PyDev 1.6.0, Eclipse 3.5
Related things to think about:
- two or more decorators
- other things that might precede or follow a function, like docstrings, comments, etc.
- nested functions and inline functions