SourceForge has been redesigned. Learn more.
Close

PyDev can't perform code completion in IPY

2010-07-29
2013-03-15
  • Techno.Scavenger

    I have two machines, one running IronPython targeted for .Net 2.0 and another machine targeted for .Net 4.0.

    The problem is that PyDev can't do Intillesense(code completion) in .Net 4.0 version of IronPython.

    Sample code

    import clr
    clr.AddReference('UIAutomationClient')
    clr.AddReference('UIAutomationTypes')
    import System.Windows.Automation as swa

    swa.AutomationE #<-- this should have been swa.AutomationElement

    Aside from Intellisense support, PyDev flags this as "Undefined variable from import: AutomationElement"

    Is this a work-around for this one?

    By the way, I enjoyed using PyDev. Thanks for sharing this wonderful tool.

    Regards,
    Technos

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2010-08-20

    I believe the issue would be that in the code-completion shell pydev won't add the clr.AddReference you pointed, only for System.Windows.Automation.

    You might be able to workaround it by adding those clr.AddReference calls manually at plugins/org.python.pydev/PySrc/importsTipper.py right after

    if sys.platform == 'cli':
    ….import clr
    ….clr.AddReference('UIAutomationClient')
    ….clr.AddReference('UIAutomationTypes')

    Cheers,

    Fabio

     
  • Techno.Scavenger

    Awesome…. works like a charm. Thanks!!!