oowekyala / intellij-javacc

JavaCC and JJTree grammar support for the IntelliJ Platform
https://plugins.jetbrains.com/plugin/11431-javacc
MIT License
45 stars 6 forks source link

open and navigate error with shortcut F2 in editor: IDE Internal Errors Occurs #26

Closed mr-cloud closed 1 year ago

mr-cloud commented 1 year ago

IDEA version: 2022.2.4 javacc plugin version: 1.10 OS: macos 12.6.1

when I browse Parser.jj file with shortcut F1 or F2 (i am not sure), error popup with follow msg:

Unhandled exception in [CoroutineName(DocumentationBrowser requests), StandaloneCoroutine{Cancelling}@68e04d16, Dispatchers.Default]

java.util.NoSuchElementException: Sequence contains no element matching the predicate. at com.github.oowekyala.ijcc.util.GenericExtensionsKt.firstOfAnyType(GenericExtensions.kt:203) at com.github.oowekyala.ijcc.ide.quickdoc.JccDocumentationProvider.generateDoc(JccDocumentationProvider.kt:42) at com.intellij.lang.documentation.CompositeDocumentationProvider.generateDoc(CompositeDocumentationProvider.java:135) at com.intellij.lang.documentation.psi.PsiElementDocumentationTarget.localDocHtml(PsiElementDocumentationTarget.kt:102) at com.intellij.lang.documentation.psi.PsiElementDocumentationTarget.localDoc(PsiElementDocumentationTarget.kt:88) at com.intellij.lang.documentation.psi.PsiElementDocumentationTarget.computeDocumentation(PsiElementDocumentationTarget.kt:75) at com.intellij.lang.documentation.impl.ImplKt$computeDocumentation$2$documentationResult$1.invoke(impl.kt:31) at com.intellij.lang.documentation.impl.ImplKt$computeDocumentation$2$documentationResult$1.invoke(impl.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:33) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1154) at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$2.run(cancellableReadAction.kt:31) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:158) at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal(cancellableReadAction.kt:29) 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:47) at com.intellij.openapi.application.CoroutinesKt.readAction(coroutines.kt:17) at com.intellij.lang.documentation.impl.ImplKt$computeDocumentation$2.invokeSuspend(impl.kt:30) at com.intellij.lang.documentation.impl.ImplKt$computeDocumentation$2.invoke(impl.kt) at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89) at kotlinx.coroutines.BuildersKtBuilders_commonKt.withContext(Builders.common.kt:165) at kotlinx.coroutines.BuildersKt.withContext(Unknown Source) at com.intellij.lang.documentation.impl.ImplKt.computeDocumentation(impl.kt:29) at com.intellij.lang.documentation.ide.impl.DocumentationPage.loadPage(DocumentationPage.kt:32) at com.intellij.lang.documentation.ide.impl.DocumentationBrowser.handleBrowserRequest(DocumentationBrowser.kt:91) at com.intellij.lang.documentation.ide.impl.DocumentationBrowser.access$handleBrowserRequest(DocumentationBrowser.kt:24) at com.intellij.lang.documentation.ide.impl.DocumentationBrowser$1$1.invokeSuspend(DocumentationBrowser.kt:51) at com.intellij.lang.documentation.ide.impl.DocumentationBrowser$1$1.invoke(DocumentationBrowser.kt) at kotlinx.coroutines.flow.FlowKtMergeKt$mapLatest$1.invokeSuspend(Merge.kt:217) at kotlinx.coroutines.flow.FlowKtMergeKt$mapLatest$1.invoke(Merge.kt) at kotlinx.coroutines.flow.FlowKtMergeKt$mapLatest$1.invoke(Merge.kt) at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$1$2.invokeSuspend(Merge.kt:34) at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$1$2.invoke(Merge.kt) at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$1$2.invoke(Merge.kt) at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:55) at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:112) at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126) at kotlinx.coroutines.BuildersKtBuilders_commonKt.launch(Builders.common.kt:56) at kotlinx.coroutines.BuildersKt.launch(Unknown Source) at kotlinx.coroutines.BuildersKtBuilders_commonKt.launch$default(Builders.common.kt:47) at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source) at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$invokeSuspend$$inlined$collect$1.emit(Collect.kt:140) at kotlinx.coroutines.flow.SharedFlowImpl.collect(SharedFlow.kt:351) at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3.invokeSuspend(Merge.kt:101) at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3.invoke(Merge.kt) at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3.invoke(Merge.kt) at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89) at kotlinx.coroutines.flow.internal.FlowCoroutineKt.flowScope(FlowCoroutine.kt:33) at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest.flowCollect(Merge.kt:25) at kotlinx.coroutines.flow.internal.ChannelFlowOperator.collectTo$suspendImpl(ChannelFlow.kt:157) at kotlinx.coroutines.flow.internal.ChannelFlowOperator.collectTo(ChannelFlow.kt) at kotlinx.coroutines.flow.internal.ChannelFlow$collectToFun$1.invokeSuspend(ChannelFlow.kt:60) 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:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

oowekyala commented 1 year ago

This appears to be a dup of #25