java.lang.ClassCastException: com.intellij.psi.impl.source.PsiJavaFileImpl cannot be cast to com.ansorgit.plugins.bash.lang.psi.api.BashFile

GitHub | jansorg | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    com.intellij.psi.impl.source.PsiJavaFileImpl cannot be cast to com.ansorgit.plugins.bash.lang.psi.api.BashFile

    GitHub | 2 years ago | jansorg
    java.lang.ClassCastException: com.intellij.psi.impl.source.PsiJavaFileImpl cannot be cast to com.ansorgit.plugins.bash.lang.psi.api.BashFile

    Root Cause Analysis

    1. java.lang.ClassCastException

      com.intellij.psi.impl.source.PsiJavaFileImpl cannot be cast to com.ansorgit.plugins.bash.lang.psi.api.BashFile

      at com.ansorgit.plugins.bash.lang.psi.impl.BashElementSharedImpl.getElementGlobalSearchScope()
    2. com.ansorgit.plugins
      BashBaseStubElementImpl.getResolveScope
      1. com.ansorgit.plugins.bash.lang.psi.impl.BashElementSharedImpl.getElementGlobalSearchScope(BashElementSharedImpl.java:30)
      2. com.ansorgit.plugins.bash.lang.psi.impl.BashBaseStubElementImpl.getResolveScope(BashBaseStubElementImpl.java:77)
      2 frames
    3. IDEA
      PsiTreeUtil.treeWalkUp
      1. com.intellij.psi.impl.PsiClassImplUtil.processDeclarationsInClass(PsiClassImplUtil.java:463)
      2. com.intellij.psi.impl.source.PsiClassImpl.processDeclarations(PsiClassImpl.java:491)
      3. com.intellij.psi.util.PsiTreeUtil.treeWalkUp(PsiTreeUtil.java:992)
      3 frames
    4. com.ansorgit.plugins
      AbstractBashCommand$CachedFunctionReference.resolveInner
      1. com.ansorgit.plugins.bash.lang.psi.impl.command.AbstractBashCommand$CachedFunctionReference.resolveInner(AbstractBashCommand.java:302)
      1 frame
    5. IDEA
      CachingReference.resolve
      1. com.intellij.psi.impl.source.resolve.reference.impl.CachingReference$MyResolver.resolve(CachingReference.java:63)
      2. com.intellij.psi.impl.source.resolve.reference.impl.CachingReference$MyResolver.resolve(CachingReference.java:58)
      3. com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:144)
      4. com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:213)
      5. com.intellij.psi.impl.source.resolve.reference.impl.CachingReference.resolve(CachingReference.java:33)
      5 frames
    6. com.ansorgit.plugins
      AbstractBashCommand$1.compute
      1. com.ansorgit.plugins.bash.lang.psi.impl.command.AbstractBashCommand$1.compute(AbstractBashCommand.java:76)
      1 frame
    7. IDEA
      CachedValuesManagerImpl.getCachedValue
      1. com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
      2. com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
      3. com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:48)
      4. com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
      5. com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:83)
      5 frames
    8. com.ansorgit.plugins
      BashAnnotator.annotate
      1. com.ansorgit.plugins.bash.lang.psi.impl.command.AbstractBashCommand.isFunctionCall(AbstractBashCommand.java:66)
      2. com.ansorgit.plugins.bash.editor.annotator.BashAnnotator.annotateCommand(BashAnnotator.java:165)
      3. com.ansorgit.plugins.bash.editor.annotator.BashAnnotator.annotate(BashAnnotator.java:77)
      3 frames
    9. IDEA
      ApplierCompleter.compute
      1. com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:159)
      2. com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102)
      3. com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass$4.run(InjectedGeneralHighlightingPass.java:376)
      4. com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86)
      5. com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.runHighlightVisitorsForInjected(InjectedGeneralHighlightingPass.java:371)
      6. com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.addInjectedPsiHighlights(InjectedGeneralHighlightingPass.java:247)
      7. com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.access$000(InjectedGeneralHighlightingPass.java:55)
      8. com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass$3.process(InjectedGeneralHighlightingPass.java:217)
      9. com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass$3.process(InjectedGeneralHighlightingPass.java:214)
      10. com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:122)
      11. com.intellij.concurrency.ApplierCompleter.access$000(ApplierCompleter.java:44)
      12. com.intellij.concurrency.ApplierCompleter$1.run(ApplierCompleter.java:85)
      13. com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1182)
      14. com.intellij.concurrency.ApplierCompleter$2.run(ApplierCompleter.java:94)
      15. com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446)
      16. com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:443)
      17. com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
      18. com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
      19. com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:106)
      20. com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:82)
      20 frames
    10. Quasar
      ForkJoinWorkerThread.run
      1. jsr166e.CountedCompleter.exec(CountedCompleter.java:684)
      2. jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
      3. jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
      4. jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
      5. jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
      6. jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:109)
      6 frames