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

Cannot find childclass JccGrammarFileRoot #10

Closed ivyxjc closed 5 years ago

ivyxjc commented 5 years ago

When use this plugin, idea throws this fatal error.

kotlin.KotlinNullPointerException
    at com.github.oowekyala.ijcc.lang.psi.impl.JccFileImpl.getGrammarFileRoot(JccFileImpl.kt:33)
    at com.github.oowekyala.ijcc.lang.psi.impl.JccFileImpl.getGlobalTokenSpecs(JccFileImpl.kt:50)
    at com.github.oowekyala.ijcc.insight.inspections.JccUnusedPrivateRegexInspection.checkFile(JccUnusedPrivateRegexInspection.kt:34)
    at com.intellij.codeInspection.AbstractBaseJavaLocalInspectionTool$1.visitFile(AbstractBaseJavaLocalInspectionTool.java:70)
    at com.intellij.extapi.psi.PsiFileBase.accept(PsiFileBase.java:70)
    at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:75)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$null$7(LocalInspectionsPass.java:316)
    at com.intellij.util.AstLoadingFilter.lambda$toComputable$2(AstLoadingFilter.java:168)
    at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:126)
    at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:115)
    at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:110)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitRestElementsAndCleanup$8(LocalInspectionsPass.java:315)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:133)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1163)
    at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:105)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
    at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:116)
    at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:96)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:147)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:222)
    at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
    at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinPool$WorkQueue.pollAndExecCC(ForkJoinPool.java:1190)
    at java.util.concurrent.ForkJoinPool.helpComplete(ForkJoinPool.java:1879)
    at java.util.concurrent.ForkJoinPool.awaitJoin(ForkJoinPool.java:2045)
    at java.util.concurrent.ForkJoinTask.doJoin(ForkJoinTask.java:390)
    at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:719)
    at java.util.concurrent.ForkJoinPool.invoke(ForkJoinPool.java:2616)
    at com.intellij.concurrency.JobLauncherImpl.invokeConcurrentlyUnderProgress(JobLauncherImpl.java:65)
    at com.intellij.concurrency.JobLauncher.invokeConcurrentlyUnderProgress(JobLauncher.java:56)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.visitRestElementsAndCleanup(LocalInspectionsPass.java:328)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.inspect(LocalInspectionsPass.java:199)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:115)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:69)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:423)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1168)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:416)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:415)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:391)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:147)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:222)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:389)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:161)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

Jetbrain Idea version:

IntelliJ IDEA 2018.3.3 (Ultimate Edition)
Build #IU-183.5153.38, built on January 9, 2019
JRE: 1.8.0_152-release-1343-b26 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
oowekyala commented 5 years ago

Thanks for the report, I'll look into it!

oowekyala commented 5 years ago

This is fixed on master. The update is pending and will probably come through Monday morning.