maximehamm / tzatziki

Cucumber y Tzatziki
26 stars 7 forks source link

Exception while using search and replace #49

Closed s2k closed 3 months ago

s2k commented 1 year ago

While I was using the search & replace (with a regular expression) to insert a column in example tables, I got this exception:

com.intellij.diagnostic.PluginException: Abandoned AnnotationBuilder - its 'create()' method was never called: Builder{message='Cucumber+', myCurrentElement=GherkinTableRow (class org.jetbrains.plugins.cucumber.psi.impl.GherkinTableRowImpl), myCurrentAnnotator=io.nimbly.tzatziki.testdiscovery.TzTestsResultsAnnotator@51c77bab, severity=INFORMATION, range=(14067,14080), textAttributesKey=CCP_TEST_OK (fallbackKey: DEFAULT_STRING), tooltip=The step was <u>successful</u>} [Plugin: io.nimbly.tzatziki]
    at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
    at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:92)
    at com.intellij.codeInsight.daemon.impl.B.assertAnnotationCreated(B.java:324)
    at com.intellij.codeInsight.daemon.impl.AnnotationHolderImpl.assertAllAnnotationsCreated(AnnotationHolderImpl.java:263)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:94)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:307)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:274)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:222)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:97)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:57)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:379)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1111)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:371)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:370)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:346)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:173)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:182)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:344)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:181)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.IllegalStateException: Abandoned AnnotationBuilder - its 'create()' method was never called: Builder{message='Cucumber+', myCurrentElement=GherkinTableRow (class org.jetbrains.plugins.cucumber.psi.impl.GherkinTableRowImpl), myCurrentAnnotator=io.nimbly.tzatziki.testdiscovery.TzTestsResultsAnnotator@51c77bab, severity=INFORMATION, range=(14067,14080), textAttributesKey=CCP_TEST_OK (fallbackKey: DEFAULT_STRING), tooltip=The step was <u>successful</u>}
    at com.intellij.codeInsight.daemon.impl.B.assertAnnotationCreated(B.java:323)
    ... 26 more

The replacement still happened, so search and replace still work, but it seems to cause this exception.

Cucumber+ version: 15.2.1 IntelliJ version: Build #IU-223.8836.41, built on March 10, 2023

maximehamm commented 3 months ago

Hello Stephan Can't reproduce it... Can you provide me a gherkin sample + the regex you were using ?

s2k commented 3 months ago

Hi Maxime,

I'm afraind I can't. I can't even remember what I was trying to do. I'll be more specific + add an example next time. :-)

maximehamm commented 3 months ago

Ok thank you Stephan. I will close this, let me know if it happens again ! PS : Please consider sharing your expression & rating Cucumber+ ;)