PsiMultiReference and PsiPolyvariantReference not working correctly

I have a PsiPolyvariantReference (a PsiMultiReference exactly) to which I pass a
series of valid, correct references. I return this from getReference for custom
language PSI element. The reference is not for a leaf element; rather,
getElement() returns an element which has several children. IDEA correctly shows
the blue underline around the entire element, but:
1. It only shows the blue underline after I have Ctrl+hovered over a leaf
element (that is, it ignores hovering over text of the element itself)
2. I can only Ctrl+Click on a leaf element
3. When I Ctrl+Click on a leaf element, it does not show the same popup you see
when ctrl+clicking an ambiguous method call; instead, the editor jumps to the
last reference in the list of references passed to PsiMultiReference

Am I misusing this class? Are these IDEA bugs?

Thanks

1 comment

The last issue looks indeed like our bug, with others it is not clear to me
how this could be.
Most probably this is a bug in the custom language PSI implementation, but
it is hard to judge without seeing the code.

Eugene.

"Keith Lea" <keith@cs.oswego.edu> wrote in message
news:dhk3fr$iv7$1@is.intellij.net...

I have a PsiPolyvariantReference (a PsiMultiReference exactly) to which I

pass a

series of valid, correct references. I return this from getReference for

custom

language PSI element. The reference is not for a leaf element; rather,
getElement() returns an element which has several children. IDEA correctly

shows

the blue underline around the entire element, but:
1. It only shows the blue underline after I have Ctrl+hovered over a leaf
element (that is, it ignores hovering over text of the element itself)
2. I can only Ctrl+Click on a leaf element
3. When I Ctrl+Click on a leaf element, it does not show the same popup

you see

when ctrl+clicking an ambiguous method call; instead, the editor jumps to

the

last reference in the list of references passed to PsiMultiReference

>

Am I misusing this class? Are these IDEA bugs?

>

Thanks



0

Please sign in to leave a comment.