LightClassReference - Goto declaration problem

I have an reference to an PsiClass. The reference is correctly
highlighted when pressing Ctrl and moving the mouse over it.
It resolves to an an LightClassReference
(PsiElementFactory.createClassReferenceElement(psiClass)).
But 'Goto declaration' simply does nothing.

What I am doing wrong?

3 comments

Hello Sven,

It should resolve to PsiClass instead. No need to resolve to reference

-


Maxim Shafirov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I have an reference to an PsiClass. The reference is correctly
highlighted when pressing Ctrl and moving the mouse over it.
It resolves to an an LightClassReference
(PsiElementFactory.createClassReferenceElement(psiClass)).
But 'Goto declaration' simply does nothing.
What I am doing wrong?



0

Now as you told that I can't remember why I created this
reference at all :)
BTW: Is this code the correct way to create an PsiClassType?
PsiElementFactory factory=psiClass.getManager().getElementFactory();
type=factory.createType(psiClass);


Maxim Shafirov (JetBrains) schrieb:

Hello Sven,

It should resolve to PsiClass instead. No need to resolve to reference

------------------
Maxim Shafirov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>> I have an reference to an PsiClass. The reference is correctly
>> highlighted when pressing Ctrl and moving the mouse over it.
>> It resolves to an an LightClassReference
>> (PsiElementFactory.createClassReferenceElement(psiClass)).
>> But 'Goto declaration' simply does nothing.
>> What I am doing wrong?
>>


0

Yes, this is perfectly legitimate.

-


Maxim Shafirov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Now as you told that I can't remember why I created this
reference at all :)
BTW: Is this code the correct way to create an PsiClassType?
PsiElementFactory
factory=psiClass.getManager().getElementFactory();
type=factory.createType(psiClass);
Maxim Shafirov (JetBrains) schrieb:

>> Hello Sven,
>>
>> It should resolve to PsiClass instead. No need to resolve to
>> reference
>>
>> -


>> Maxim Shafirov
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>>> I have an reference to an PsiClass. The reference is correctly
>>> highlighted when pressing Ctrl and moving the mouse over it.
>>> It resolves to an an LightClassReference
>>> (PsiElementFactory.createClassReferenceElement(psiClass)).
>>> But 'Goto declaration' simply does nothing.
>>> What I am doing wrong?


0

Please sign in to leave a comment.