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

"c.i.p.i.PomTargetPsiElementImpl cannot be presented" error on Hover #944

Closed
fbricon opened this issue Jun 12, 2023 · 2 comments
Closed
Assignees
Labels
bug Something isn't working hover qute Qute support
Milestone

Comments

@fbricon
Copy link
Contributor

fbricon commented Jun 12, 2023

Following the fix from #940, we still have an error on the 1st hover over a variable in a qute template:

com.intellij.diagnostic.PluginException: com.intellij.psi.impl.PomTargetPsiElementImpl cannot be presented
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:83)
	at com.intellij.codeInsight.navigation.UtilKt.presentationError(util.kt:108)
	at com.intellij.codeInsight.navigation.UtilKt.targetPresentation(util.kt:92)
	at com.intellij.lang.documentation.psi.PsiElementDocumentationTarget.getPresentation(PsiElementDocumentationTarget.kt:64)
	at com.intellij.lang.documentation.impl.ImplKt.documentationRequest(impl.kt:18)
	at com.intellij.lang.documentation.ide.impl.DocumentationTargetHoverInfoKt$calcTargetDocumentationInfo$1$request$1.invoke(DocumentationTargetHoverInfo.kt:41)
	at com.intellij.lang.documentation.ide.impl.DocumentationTargetHoverInfoKt$calcTargetDocumentationInfo$1$request$1.invoke(DocumentationTargetHoverInfo.kt)
	at com.intellij.openapi.application.rw.InternalReadAction.insideReadAction(InternalReadAction.kt:96)
	at com.intellij.openapi.application.rw.InternalReadAction.access$insideReadAction(InternalReadAction.kt:13)
	at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$1.invoke(InternalReadAction.kt:81)
	at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$1.invoke(InternalReadAction.kt:13)
	at com.intellij.openapi.progress.CancellationKt$sam$com_intellij_openapi_util_ThrowableComputable$0.compute(cancellation.kt)
	at com.intellij.openapi.progress.Cancellation.withJob(Cancellation.java:60)
	at com.intellij.openapi.progress.CancellationKt.withJob(cancellation.kt:14)
	at com.intellij.openapi.progress.CancellationKt.executeWithJobAndCompleteIt(cancellation.kt:111)
	at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$2$1.run(cancellableReadAction.kt:34)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1152)
	at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$2.run(cancellableReadAction.kt:32)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:158)
	at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal(cancellableReadAction.kt:30)
	at com.intellij.openapi.application.rw.InternalReadAction.tryReadCancellable(InternalReadAction.kt:80)
	at com.intellij.openapi.application.rw.InternalReadAction.access$tryReadCancellable(InternalReadAction.kt:13)
	at com.intellij.openapi.application.rw.InternalReadAction$tryReadAction$2.invoke(InternalReadAction.kt:66)
	at com.intellij.openapi.application.rw.InternalReadAction$tryReadAction$2.invoke(InternalReadAction.kt:13)
	at com.intellij.openapi.progress.CancellationKt$sam$com_intellij_openapi_util_ThrowableComputable$0.compute(cancellation.kt)
	at com.intellij.openapi.progress.Cancellation.withJob(Cancellation.java:60)
	at com.intellij.openapi.progress.CancellationKt.withJob(cancellation.kt:14)
	at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:138)
	at com.intellij.openapi.application.rw.InternalReadAction.tryReadAction(InternalReadAction.kt:61)
	at com.intellij.openapi.application.rw.InternalReadAction.readLoop(InternalReadAction.kt:53)
	at com.intellij.openapi.application.rw.InternalReadAction.access$readLoop(InternalReadAction.kt:13)
	at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$4.invokeSuspend(InternalReadAction.kt:33)
	at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$4.invoke(InternalReadAction.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
	at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
	at com.intellij.openapi.application.rw.InternalReadAction.runReadAction(InternalReadAction.kt:32)
	at com.intellij.openapi.application.rw.PlatformReadActionSupport.executeReadAction(PlatformReadActionSupport.kt:24)
	at com.intellij.openapi.application.CoroutinesKt.constrainedReadAction(coroutines.kt:50)
	at com.intellij.openapi.application.CoroutinesKt.readAction(coroutines.kt:20)
	at com.intellij.lang.documentation.ide.impl.DocumentationTargetHoverInfoKt$calcTargetDocumentationInfo$1.invokeSuspend(DocumentationTargetHoverInfo.kt:36)
	at com.intellij.lang.documentation.ide.impl.DocumentationTargetHoverInfoKt$calcTargetDocumentationInfo$1.invoke(DocumentationTargetHoverInfo.kt)
	at com.intellij.openapi.progress.CoroutinesKt$runBlockingCancellable$2$1.invokeSuspend(coroutines.kt:110)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at com.intellij.openapi.progress.CoroutinesKt$runBlockingCancellable$2.invoke(coroutines.kt:108)
	at com.intellij.openapi.progress.CoroutinesKt$runBlockingCancellable$2.invoke(coroutines.kt)
	at com.intellij.openapi.progress.CancellationKt$ensureCurrentJob$$inlined$use$lambda$1.invoke(cancellation.kt:69)
	at com.intellij.openapi.progress.CancellationKt$sam$com_intellij_openapi_util_ThrowableComputable$0.compute(cancellation.kt)
	at com.intellij.openapi.progress.Cancellation.withJob(Cancellation.java:60)
	at com.intellij.openapi.progress.CancellationKt.withJob(cancellation.kt:14)
	at com.intellij.openapi.progress.CancellationKt.executeWithJobAndCompleteIt(cancellation.kt:111)
	at com.intellij.openapi.progress.CancellationKt.ensureCurrentJob(cancellation.kt:68)
	at com.intellij.openapi.progress.CoroutinesKt.runBlockingCancellable(coroutines.kt:103)
	at com.intellij.openapi.progress.CoroutinesKt.runBlockingCancellable(coroutines.kt:71)
	at com.intellij.lang.documentation.ide.impl.DocumentationTargetHoverInfoKt.calcTargetDocumentationInfo(DocumentationTargetHoverInfo.kt:35)
	at com.intellij.openapi.editor.EditorMouseHoverPopupManager$Context.documentationHoverInfo(EditorMouseHoverPopupManager.java:528)
	at com.intellij.openapi.editor.EditorMouseHoverPopupManager$Context.calcInfo(EditorMouseHoverPopupManager.java:518)
	at com.intellij.openapi.editor.EditorMouseHoverPopupManager.lambda$scheduleProcessing$7(EditorMouseHoverPopupManager.java:199)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.openapi.editor.EditorMouseHoverPopupManager.lambda$scheduleProcessing$8(EditorMouseHoverPopupManager.java:195)
	at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:241)
	at com.intellij.util.Alarm$Request.runSafely(Alarm.java:388)
	at com.intellij.util.Alarm$Request.run(Alarm.java:377)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:223)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:241)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:214)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:203)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:829)

Originally posted by @fbricon in #940 (comment)

@fbricon
Copy link
Contributor Author

fbricon commented Jun 13, 2023

Got this variation of the same exception:

com.intellij.diagnostic.PluginException: com.intellij.psi.DelegatePsiTarget cannot be presented
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:89)
	at com.intellij.codeInsight.navigation.UtilKt.presentationError(util.kt:110)
	at com.intellij.codeInsight.navigation.UtilKt.targetPresentation(util.kt:93)
	at com.intellij.lang.documentation.psi.PsiElementDocumentationTarget.computePresentation(PsiElementDocumentationTarget.kt:68)
	at com.intellij.platform.backend.documentation.impl.ImplKt.documentationRequest(impl.kt:17)
	at com.intellij.lang.documentation.ide.impl.DocumentationTargetHoverInfoKt$calcTargetDocumentationInfo$1$request$1.invoke(DocumentationTargetHoverInfo.kt:41)
	at com.intellij.lang.documentation.ide.impl.DocumentationTargetHoverInfoKt$calcTargetDocumentationInfo$1$request$1.invoke(DocumentationTargetHoverInfo.kt:36)
	at com.intellij.openapi.application.rw.InternalReadAction.insideReadAction(InternalReadAction.kt:105)
	at com.intellij.openapi.application.rw.InternalReadAction.access$insideReadAction(InternalReadAction.kt:14)
	at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$2.invoke(InternalReadAction.kt:95)
	at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$2.invoke(InternalReadAction.kt:94)
	at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$1.invoke$lambda$1$lambda$0(cancellableReadAction.kt:41)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1143)
	at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$1.invoke$lambda$1(cancellableReadAction.kt:39)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:133)
	at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$1.invoke(cancellableReadAction.kt:37)
	at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:204)
	at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal(cancellableReadAction.kt:34)
	at com.intellij.openapi.application.rw.InternalReadAction.tryReadCancellable(InternalReadAction.kt:94)
	at com.intellij.openapi.application.rw.InternalReadAction.tryReadAction(InternalReadAction.kt:76)
	at com.intellij.openapi.application.rw.InternalReadAction.readLoop(InternalReadAction.kt:63)
	at com.intellij.openapi.application.rw.InternalReadAction.access$readLoop(InternalReadAction.kt:14)
	at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$4.invokeSuspend(InternalReadAction.kt:42)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

@fbricon
Copy link
Contributor Author

fbricon commented Jul 11, 2023

Fixed with #954

@fbricon fbricon closed this as completed Jul 11, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in IntelliJ Quarkus Jul 11, 2023
@fbricon fbricon added this to the 1.22.0 milestone Jul 11, 2023
fbricon referenced this issue Aug 1, 2023
Fixes #415

Signed-off-by: Jeff MAURY <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hover qute Qute support
Projects
Status: Done
Development

No branches or pull requests

2 participants