#572 Please add implement method to refactoring menu

closed-fixed
nobody
5
2012-03-25
2012-03-24
Luke
No

This would be similar to extract method except that it woud infer the type and add the method to that class.

For example:

If I had an unimplemented method as follows:

instanceOfClassA.unimplementedMethod(param1, param2)

When I used the refactoringing I would get this:

class ClassA(object):

def unimplementedMethod(param1, param2)
pass

Additionally it would be nice if it notice that a value was being returned and put in a return statement

Discussion

  • Fabio Zadrozny

    Fabio Zadrozny - 2012-03-25
    • status: open --> closed-fixed
     
  • Fabio Zadrozny

    Fabio Zadrozny - 2012-03-25

    Actually, that's already available in 2 ways:

    You can either: select a given class, right click > refactoring > override/implement methods (in the menu, the shortcut for it will appear).

    Another option would be in the derived class method, request a code-completion right after the 'def'.

    I.e.:

    class A:
    ..def method(self):
    ....pass

    class B(A):
    ..def <- request code completion here and it should show the list of methods to override.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks