Question about references in OpenAPI

Dmitry, I'm working on your Python plugin, right now to add a way for a
depending plugin to provide references within PyElements. I have set up
a python-specific reference provider registry which uses regular
ReferenceProviders to find references in PyElement.getReferences().

This system works well, partly - the references are correctly inserted
and I can ctrlhover over them and it underlines and ctrlclick jumps to
the right place. However, completion doesn't seem to work - when my
cursor is inside the reference, I press ctrl+space, and the reference's
getVariants is never called, and I see "No suggestions".

I won't post the code, if you want to debug, because this is private
internal project. However I could probably develop test case.

1 comment

Keith Lea wrote:

Dmitry, I'm working on your Python plugin, right now to add a way for a
depending plugin to provide references within PyElements. I have set up
a python-specific reference provider registry which uses regular
ReferenceProviders to find references in PyElement.getReferences().

This system works well, partly - the references are correctly inserted
and I can ctrlhover over them and it underlines and ctrlclick jumps to
the right place. However, completion doesn't seem to work - when my
cursor is inside the reference, I press ctrl+space, and the reference's
getVariants is never called, and I see "No suggestions".

I won't post the code, if you want to debug, because this is private
internal project. However I could probably develop test case.


I've been looking deeper into this and I've tried reproducing it in demo project
under the same conditions, and I cannot reproduce it. All of my references seem
okay - getTextRange returns the correct value, getElement, etc. Does anyone have
any ideas about what I could be doing wrong?

0

Please sign in to leave a comment.