Last Site Update: 03 February 2005 | Latest Version: 0.9.0

 
Features Editor Debugger Code Completion Templates
Code Coverage Content Assistants Refactoring Tasks PyLint
 
 
Home
Features
Editor
Debugger
Code Completion
Templates
Code Coverage
Content Assistants
Refactoring
Tasks
PyLint
Roadmap
Screenshots
Download
Credits
More info
FAQ / BUGS
Users List (code)
Users Forum
Fabio Zadrozny Weblog
Aleks Totic Weblog
Mentions in the press
PyDev with Eclipse and Ant
Pydev at OsCon
Hosted at
PyDev at Sourceforge
Donate
 

Content Assistant

This is still on development, but it can already be useful. Current status is:

New content assistants added (0.7.1):

  • Move imports:

  • If you have some import on a non global scope, a move to global scope tip appears. It moves the current import line to the beggining of the file.

  • Surround with try..except or try..finally:

  • If you select any portion of a line (must be at least one character selected), typing Ctrl+1 will bring you surround with try..except and try..finally.
    Note: be careful on what you select to do this... it is not fool prof... if your selection is not ok, it doesn't care and tries to make it anyway.

  • Make statement new Class or Method:

  • If you are in the global scope and write a call (e.g.: NewClass(a, b)), and press Ctrl+1, the following tips will appear:
    Make this a new method and make this a new class.


    Resuming:

    Class C:

    ....def a(self):
    ........self.newMethod()| Ctrl+1 also brings some interesting assistants.

    class C:

    ....def __init__(self, param):
    ........self.newMethod()<- create new method on class C (with params if needed)
    ........................<- assign result to new local variable
    ........................<- assign result to new field

    ........a = A()
    ........a.newMethod() <- create new method on class A
    ......................<- assign result to new local variable
    ......................<- assign result to new field

    ........param.b() <- don't show anything.

    ........self.a1 = A()

    ........self.a1.newMethod() <- create new method on class A (difficult part is discovering class - still not implemented)
    ............................<- assign result to new local variable
    ............................<- assign result to new field

    ........def m(self):
    ............self.a1.newMethod() <- create new method on class A (difficult part is discovering class - still not implemented)
    ................................<- assign result to new local variable
    ................................<- assign result to new field

    ............import compiler<- move import to global context


    NewClass() <- Make this a new class
    ...........<- Make this a new method
    ...........<- assign result to new local variable
    ...........<- assign result to new field