content assistant: assign __init__ parameters to attributes
Brought to you by:
fabioz
It would be neat to be able to position myself after
def __init__(self, moo, cow):
and press Ctrl-1 and see a content assistant that lets
me assigns the values of moo and cow to instance
attributes with the same name, like so:
self.moo = moo
self.cow = cow
Thanks, and keep up the good work!
/Joel
Logged In: YES
user_id=617340
I've just released 1.0.4, and it has a scripting engine so
that you can add your own actions to pydev, and I was
wondering if you would like to try it implementing something
as a Ctrl+2+a (from assign) to do that (should be
straightforward, and I can help you on the details).
Cheers,
Fabio
Logged In: YES
user_id=1008220
I'll be delighted :-)
Could you point me to some starter docs to get me going?
Take care!
/Joel
Logged In: YES
user_id=617340
Sure:
http://www.fabioz.com/pydev/manual_articles_scripting.html
If you need anything else, you could post to the pydev-code
list (I'll help you there then).
-- Also, for this implementation, you can check the class
that makes the assist for adding the @param things. The link
to it in the cvs is:
http://cvs.sourceforge.net/viewcvs.py/pydev/org.python.pydev/src/org/python/pydev/editor/correctionassist/heuristics/AssistDocString.java?view=markup
Cheers,
Fabio
Logged In: YES
user_id=617340
Hi Joel,
this one is done for 1.0.6... right? ;-)
Logged In: YES
user_id=1008220
Right.
:-)
/Joel