#12 Deeper Digging AutoComplete + CallTips

closed
None
5
2012-09-14
2009-04-11
Anonymous
No

Hi. Loving PyPE so far out of all the editors I've auditioned! However, I've got one request.

I'd like PyPE to search my IMPORTed modules for auto-completion and call tips also. I spend more time opening up my imports, searching for the function whose arguments I can't remember, and then going back to my current document more than I care to!

i.e.

import os
a=500
b=600
c=os.wa.. should pop up os.WALK then when the ( is typed pop up a CALLTIP for os.walk. if os.py was scanned from the import statement it could be treated as thought it is a function defined in the current document//appended to the dictionary/list being maintained of in document functions/classes and then leverage existing calltip/auto-completion functionality.

If that is too much work, another half solution that would be still be a great alternative is...give us an option to MERGE the "Tools" list information from ALL currently opened documents. If I have mycurrentfile.py open, and ALSO manually open os.py ...I'd like Tools:Filtering to be able to be set to search mycurrentfile.py AND os.py ..so that I could easily Tools:Filter:"walk" and see the function/arguments/calltip information of os.walk. If this "Tools" list was able to be merged, it seems the calltips/autocompletion are drawn from this same list...so if they were able to be forced to be merged, it seems like the calltip/autocomplete engine would already see both *.py files classes/methods/functions/etc and already function correctly!

Discussion

  • Josiah Carlson
    Josiah Carlson
    2009-04-12

    I've been meaning to add a few different things to PyPE's autocompletion/introspection capabilities for a while, this is one of them. I've got a start to this, but no promises this will get done soon.

     
  • Josiah Carlson
    Josiah Carlson
    2009-05-04

    I added a better parser based on compiler.ast. It knows about Python scopes and does far better autocomplete as a result. It knows about imports, but I've not plugged import traversal in ('from module import cls' is a little ugly).

    I also hacked together a global filter list; every document that has been parsed has it's contents merged into one large "Filter" tool.

    I should probably release a beta soon, and I should make it easier for people to get recent revisions.

     
  • Josiah Carlson
    Josiah Carlson
    2009-05-05

    Check the most recent revision of the subversion repository for a new Tool, the "Global Filter". It includes filters for everything that has been parsed.