Adding support for framework in pycharm


Hi all,

The last couple of months I started a side-project where I want to add support for a python-xml framework in PyCharm. I have spent many hours trying to find a relevant tutorial, checking the source code of other plugins or the PyCharm itself and the amount of information seems overwhelming for me to digest.

I would kindly like to ask if anyone can point me towards the right direction for the following core feature:

I would like to extend the auto-completion for class members with items (class attributes and members) that appear on different .py files.

- Should I create new stub indices or can I modify existing ones to add the additional items? Any relevant tutorial or reference?

- What extension point should i use for that? "PyClassMembersProvider" seems a good choice but I cannot understand how it will interact and analyse the code. Probably access stubs? How can I do that?

Sorry for the messy structure of the question. Any thoughts or hints will be greatly appreciated.


1 comment
Andrey Vlasovskikh
Comment actions Permalink

Hi Ltsochat! Yes, the documentation is a bit sparse. The easiest way is probably looking for examples in open-source plugins and asking here :)

In general, if you want to add custom attributes to some classes, then `PyClassMembersProvider` is the right extension point for you. You can find how it's used in the source code by looking for its usages in the code base of intellij-community. It's Find Usages on the name of the interface. You'll find most of the usages relevant to completing custom class members in `PyClassTypeImpl`.

By the way, what is this python-xml framework you're interested in supporing in PyCharm? Is it open-source? I could answer more specific questions better if I knew a bit more about the context.


Please sign in to leave a comment.