nette-intellij/intellij-neon

java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 [PhpStorm 2021.1.2]

Zazimou opened this issue · 1 comments

This error occurs after copying existing text:

java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
	at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
	at java.base/java.util.Objects.checkIndex(Objects.java:372)
	at java.base/java.util.ArrayList.get(ArrayList.java:459)
	at cz.juzna.intellij.neon.parser.NeonParserUtil.validateTabsSpaces(NeonParserUtil.java:211)
	at cz.juzna.intellij.neon.parser.NeonParserUtil.checkValidIndent(NeonParserUtil.java:150)
	at cz.juzna.intellij.neon.parser.NeonParser.indent(NeonParser.java:647)
	at cz.juzna.intellij.neon.parser.NeonParser.keyItem(NeonParser.java:884)
	at cz.juzna.intellij.neon.parser.NeonParser.innerKeyValPair_0_1(NeonParser.java:752)
	at cz.juzna.intellij.neon.parser.NeonParser.innerKeyValPair_0(NeonParser.java:742)
	at cz.juzna.intellij.neon.parser.NeonParser.innerKeyValPair(NeonParser.java:730)
	at cz.juzna.intellij.neon.parser.NeonParser.keyValPair(NeonParser.java:928)
	at cz.juzna.intellij.neon.parser.NeonParser.arrayLine(NeonParser.java:157)
	at cz.juzna.intellij.neon.parser.NeonParser.array_0_0(NeonParser.java:69)
	at cz.juzna.intellij.neon.parser.NeonParser.array_0(NeonParser.java:55)
	at cz.juzna.intellij.neon.parser.NeonParser.array(NeonParser.java:44)
	at cz.juzna.intellij.neon.parser.NeonParser.keyValPairValue_1_1_1_0(NeonParser.java:1048)
	at cz.juzna.intellij.neon.parser.NeonParser.keyValPairValue_1_1_1(NeonParser.java:1036)
	at cz.juzna.intellij.neon.parser.NeonParser.keyValPairValue_1_1(NeonParser.java:1019)
	at cz.juzna.intellij.neon.parser.NeonParser.keyValPairValue_1(NeonParser.java:1007)
	at cz.juzna.intellij.neon.parser.NeonParser.keyValPairValue(NeonParser.java:989)
	at cz.juzna.intellij.neon.parser.NeonParser.innerKeyValPair_0_1_1(NeonParser.java:761)
	at cz.juzna.intellij.neon.parser.NeonParser.innerKeyValPair_0_1(NeonParser.java:753)
	at cz.juzna.intellij.neon.parser.NeonParser.innerKeyValPair_0(NeonParser.java:742)
	at cz.juzna.intellij.neon.parser.NeonParser.innerKeyValPair(NeonParser.java:730)
	at cz.juzna.intellij.neon.parser.NeonParser.keyValPair(NeonParser.java:928)
	at cz.juzna.intellij.neon.parser.NeonParser.mainArrayLine(NeonParser.java:1093)
	at cz.juzna.intellij.neon.parser.NeonParser.mainArray_0_0(NeonParser.java:1085)
	at cz.juzna.intellij.neon.parser.NeonParser.mainArray_0(NeonParser.java:1071)
	at cz.juzna.intellij.neon.parser.NeonParser.mainArray(NeonParser.java:1060)
	at cz.juzna.intellij.neon.parser.NeonParser.root_1_0_0(NeonParser.java:1243)
	at cz.juzna.intellij.neon.parser.NeonParser.root_1_0(NeonParser.java:1229)
	at cz.juzna.intellij.neon.parser.NeonParser.root_1(NeonParser.java:1218)
	at cz.juzna.intellij.neon.parser.NeonParser.root(NeonParser.java:1200)
	at cz.juzna.intellij.neon.parser.NeonParser.parse_root_(NeonParser.java:35)
	at cz.juzna.intellij.neon.parser.NeonParser.parse_root_(NeonParser.java:31)
	at cz.juzna.intellij.neon.parser.NeonParser.parseLight(NeonParser.java:26)
	at cz.juzna.intellij.neon.parser.NeonParser.parse(NeonParser.java:18)
	at com.intellij.psi.tree.ILazyParseableElementType.doParseContents(ILazyParseableElementType.java:81)
	at com.intellij.psi.tree.IFileElementType.parseContents(IFileElementType.java:53)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.lambda$ensureParsed$0(LazyParseableElement.java:192)
	at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:567)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:191)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:242)
	at com.intellij.psi.impl.source.tree.CompositeElement.countChildren(CompositeElement.java:415)
	at com.intellij.psi.impl.source.tree.CompositeElement.getChildrenAsPsiElements(CompositeElement.java:378)
	at com.intellij.psi.impl.source.PsiFileImpl.getChildren(PsiFileImpl.java:735)
	at cz.juzna.intellij.neon.util.NeonPsiUtil.acceptAllFiles(NeonPsiUtil.java:38)
	at cz.juzna.intellij.neon.util.NeonPsiUtil.acceptAllFiles(NeonPsiUtil.java:19)
	at cz.juzna.intellij.neon.util.NeonPhpUtil.findNeonServiceDefinitions(NeonPhpUtil.java:209)
	at cz.juzna.intellij.neon.util.NeonPhpUtil.findNeonServiceDefinition(NeonPhpUtil.java:199)
	at cz.juzna.intellij.neon.config.NeonConfiguration.findService(NeonConfiguration.java:364)
	at cz.juzna.intellij.neon.psi.impl.NeonPsiImplUtil.getPhpType(NeonPsiImplUtil.java:215)
	at cz.juzna.intellij.neon.psi.impl.NeonMethodUsageImpl.getPhpType(NeonMethodUsageImpl.java:67)
	at cz.juzna.intellij.neon.inspections.MethodUsagesInspection$1.visitElement(MethodUsagesInspection.java:41)
	at com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:273)
	at cz.juzna.intellij.neon.psi.impl.NeonMethodUsageImpl.accept(NeonMethodUsageImpl.java:31)
	at com.intellij.psi.PsiWalkingState.visit(PsiWalkingState.java:67)
	at com.intellij.psi.PsiWalkingState.visit(PsiWalkingState.java:24)
	at com.intellij.util.WalkingState.walkChildren(WalkingState.java:62)
	at com.intellij.util.WalkingState.elementStarted(WalkingState.java:49)
	at com.intellij.psi.PsiWalkingState.elementStarted(PsiWalkingState.java:76)
	at com.intellij.psi.PsiRecursiveElementWalkingVisitor.visitElement(PsiRecursiveElementWalkingVisitor.java:48)
	at cz.juzna.intellij.neon.inspections.MethodUsagesInspection$1.visitElement(MethodUsagesInspection.java:68)
	at com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:273)
	at cz.juzna.intellij.neon.psi.impl.NeonMainArrayImpl.accept(NeonMainArrayImpl.java:28)
	at com.intellij.psi.impl.source.tree.SharedImplUtil.acceptChildren(SharedImplUtil.java:185)
	at com.intellij.psi.impl.source.PsiFileImpl.acceptChildren(PsiFileImpl.java:750)
	at cz.juzna.intellij.neon.inspections.MethodUsagesInspection.checkFile(MethodUsagesInspection.java:37)
	at com.intellij.codeInspection.LocalInspectionTool$1.visitFile(LocalInspectionTool.java:145)
	at com.intellij.extapi.psi.PsiFileBase.accept(PsiFileBase.java:60)
	at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:65)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitRestElementsAndCleanup$7(LocalInspectionsPass.java:346)
	at com.intellij.util.AstLoadingFilter.lambda$toComputable$2(AstLoadingFilter.java:174)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:132)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:121)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:111)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitRestElementsAndCleanup$10(LocalInspectionsPass.java:346)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:136)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1096)
	at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:92)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
	at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:104)
	at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:83)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:167)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:178)
	at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:83)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

@Zazimou and which plugin version?