Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference contributor not working yet #64

Closed
thebigb opened this issue Aug 8, 2016 · 3 comments
Closed

Reference contributor not working yet #64

thebigb opened this issue Aug 8, 2016 · 3 comments

Comments

@thebigb
Copy link

thebigb commented Aug 8, 2016

The exception below is thrown in a scenario as defined in #26.

DocTagNameAnnotationReferenceContributor.java:261

I've tried replacing PhpClass by PhpNamedElement which mutes the exception, but the reference is still not being detected.

This occurs at least in 162.1447.5 (latest EAP), and 162.1121.38 (latest release).

com.jetbrains.php.lang.psi.elements.impl.PhpUseImpl cannot be cast to com.jetbrains.php.lang.psi.elements.PhpClass
java.lang.ClassCastException: com.jetbrains.php.lang.psi.elements.impl.PhpUseImpl cannot be cast to com.jetbrains.php.lang.psi.elements.PhpClass
    at de.espend.idea.php.annotation.reference.DocTagNameAnnotationReferenceContributor$PhpDocIdentifierReference.isReferenceTo(DocTagNameAnnotationReferenceContributor.java:261)
    at com.intellij.psi.search.SingleTargetRequestResultProcessor.processTextOccurrence(SingleTargetRequestResultProcessor.java:52)
    at com.intellij.psi.impl.search.PsiSearchHelperImpl$10.execute(PsiSearchHelperImpl.java:736)
    at com.intellij.psi.impl.search.LowLevelSearchUtil.a(LowLevelSearchUtil.java:134)
    at com.intellij.psi.impl.search.LowLevelSearchUtil.access$000(LowLevelSearchUtil.java:47)
    at com.intellij.psi.impl.search.LowLevelSearchUtil$1.execute(LowLevelSearchUtil.java:204)
    at com.intellij.psi.impl.search.LowLevelSearchUtil.processTextOccurrences(LowLevelSearchUtil.java:271)
    at com.intellij.psi.impl.search.LowLevelSearchUtil.processElementsContainingWordInElement(LowLevelSearchUtil.java:200)
    at com.intellij.psi.impl.search.PsiSearchHelperImpl$2.processInReadAction(PsiSearchHelperImpl.java:200)
    at com.intellij.psi.impl.search.PsiSearchHelperImpl$2.processInReadAction(PsiSearchHelperImpl.java:188)
    at com.intellij.openapi.application.ReadActionProcessor$1.compute(ReadActionProcessor.java:32)
    at com.intellij.openapi.application.ReadActionProcessor$1.compute(ReadActionProcessor.java:29)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:866)
    at com.intellij.openapi.application.ReadActionProcessor.process(ReadActionProcessor.java:29)
    at com.intellij.concurrency.ApplierCompleter.b(ApplierCompleter.java:123)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1033)
    at com.intellij.concurrency.ApplierCompleter.b(ApplierCompleter.java:96)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:494)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
    ...
@Haehnchen
Copy link
Owner

@thebigb do you have a real code example, so i am able to test against?

@thebigb
Copy link
Author

thebigb commented Aug 8, 2016

Okay... Well one problem was the cast thing, which I see you've already fixed in 4.1.1.

The issue of it not working was me just being silly. I was referencing a class in the same namespace...

Looks good to me now. Thanks!

@thebigb thebigb closed this as completed Aug 8, 2016
@Haehnchen
Copy link
Owner

Haehnchen commented Aug 8, 2016

ok, thank you for your feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants