Git Product home page Git Product logo

intellijbehave's Introduction

JBehave Support for IntelliJ IDEA

JBehave Support

IntelliJ IDEA Plugin for JBehave

This plugin provides some support for JBehave. It is a fork of IntelliJBehave, originally created by Aman Kumar.

Features

The plugin provides the following features:

  • Basic syntax highlighting for JBehave story files
  • Jump to step definition in Java or Groovy
  • Error Highlighting in story if step was not defined
  • Create new story files from a configurable story template
  • Comment/uncomment lines in story files
  • Code inspections to report unused steps definitions and undefined step usages
  • Run *.story files
  • Spellchecking in .story files
  • Structure view for .story files (via Ctrl+12 or similar shortcut)

Known limitations

  • Searches complete module classpath, no configuration available to limit scope
  • Does not take into account any custom JBehave configuration
  • Lifecycles are currently not supported in the .story file structure view

Contribute

  • Setup:
git clone <URL>
./gradlew idea

In IntelliJ just 'Open' that folder and everything should be ready.

  • Run:
./gradlew runIde

You can do this from within IntelliJ if you enable gradle on the project.

Contributions

See original documentation at https://github.com/kumaraman21/IntelliJBehave/wiki.

Most of the original code has been retained, but several improvements have been incorporated by various contributors:

intellijbehave's People

Contributors

arnauld avatar dmalch avatar harley84 avatar jarosite avatar jenodk avatar kumaraman21 avatar picimako avatar rodrigoquesadadev avatar ulmana avatar valfirst avatar witspirit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

intellijbehave's Issues

JBehave Support plugin crashing in IntelliJ Idea ultimate 2016.3.5

Almost every time I open a .feature file (associated as a JBehave Story file type), I get exceptions in my "IDE Fatal Errors" log:

Worker exited due to exception
java.lang.NullPointerException
	at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
	at java.util.regex.Matcher.reset(Matcher.java:309)
	at java.util.regex.Matcher.<init>(Matcher.java:229)
	at java.util.regex.Pattern.matcher(Pattern.java:1093)
	at org.jbehave.core.steps.PatternVariantBuilder.variantsFor(PatternVariantBuilder.java:140)
	at org.jbehave.core.steps.PatternVariantBuilder.<init>(PatternVariantBuilder.java:117)
	at com.github.kumaraman21.intellijbehave.service.JBehaveUtil$5.apply(JBehaveUtil.java:58)
	at com.github.kumaraman21.intellijbehave.service.JBehaveUtil$5.apply(JBehaveUtil.java:55)
	at com.google.common.collect.Iterators$8.transform(Iterators.java:799)
	at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
	at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
	at com.google.common.collect.Iterators$5.hasNext(Iterators.java:548)
	at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:314)
	at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:300)
	at com.google.common.collect.FluentIterable.toSet(FluentIterable.java:396)
	at com.github.kumaraman21.intellijbehave.service.JBehaveUtil.getAliasesAnnotationTexts(JBehaveUtil.java:181)
	at com.github.kumaraman21.intellijbehave.service.JBehaveUtil.getAnnotationTexts(JBehaveUtil.java:142)
	at com.github.kumaraman21.intellijbehave.service.JavaStepDefinition.getAnnotationTexts(JavaStepDefinition.java:103)
	at com.github.kumaraman21.intellijbehave.service.JavaStepDefinition.getStepMatchers(JavaStepDefinition.java:76)
	at com.github.kumaraman21.intellijbehave.service.JavaStepDefinition.matches(JavaStepDefinition.java:36)
	at com.github.kumaraman21.intellijbehave.service.JBehaveStepsIndex.findStepDefinitions(JBehaveStepsIndex.java:44)
	at com.github.kumaraman21.intellijbehave.resolver.StepPsiReference.multiResolve(StepPsiReference.java:119)
	at com.github.kumaraman21.intellijbehave.resolver.StepPsiReference.resolve(StepPsiReference.java:56)
	at com.intellij.codeInsight.navigation.CtrlMouseHandler.a(CtrlMouseHandler.java:623)
	at com.intellij.codeInsight.navigation.CtrlMouseHandler.a(CtrlMouseHandler.java:522)
	at com.intellij.codeInsight.navigation.CtrlMouseHandler.a(CtrlMouseHandler.java:504)
	at com.intellij.codeInsight.navigation.CtrlMouseHandler.access$2200(CtrlMouseHandler.java:105)
	at com.intellij.codeInsight.navigation.CtrlMouseHandler$TooltipProvider.a(CtrlMouseHandler.java:836)
	at com.intellij.codeInsight.navigation.CtrlMouseHandler$TooltipProvider.access$2900(CtrlMouseHandler.java:776)
	at com.intellij.codeInsight.navigation.CtrlMouseHandler$TooltipProvider$1.performInReadAction(CtrlMouseHandler.java:821)
	at com.intellij.openapi.progress.util.ReadTask$1.compute(ReadTask.java:70)
	at com.intellij.openapi.progress.util.ReadTask$1.compute(ReadTask.java:67)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:899)
	at com.intellij.openapi.progress.util.ReadTask.runBackgroundProcess(ReadTask.java:67)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.a(ProgressIndicatorUtils.java:221)
	at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:199)
	at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:179)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:568)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:519)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:164)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:196)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.a(ProgressIndicatorUtils.java:219)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.access$000(ProgressIndicatorUtils.java:44)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils$4.run(ProgressIndicatorUtils.java:179)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)


java.lang.NullPointerException
	at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
	at java.util.regex.Matcher.reset(Matcher.java:309)
	at java.util.regex.Matcher.<init>(Matcher.java:229)
	at java.util.regex.Pattern.matcher(Pattern.java:1093)
	at org.jbehave.core.steps.PatternVariantBuilder.variantsFor(PatternVariantBuilder.java:140)
	at org.jbehave.core.steps.PatternVariantBuilder.<init>(PatternVariantBuilder.java:117)
	at com.github.kumaraman21.intellijbehave.service.JBehaveUtil$5.apply(JBehaveUtil.java:58)
	at com.github.kumaraman21.intellijbehave.service.JBehaveUtil$5.apply(JBehaveUtil.java:55)
	at com.google.common.collect.Iterators$8.transform(Iterators.java:799)
	at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
	at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
	at com.google.common.collect.Iterators$5.hasNext(Iterators.java:548)
	at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:314)
	at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:300)
	at com.google.common.collect.FluentIterable.toSet(FluentIterable.java:396)
	at com.github.kumaraman21.intellijbehave.service.JBehaveUtil.getAliasesAnnotationTexts(JBehaveUtil.java:181)
	at com.github.kumaraman21.intellijbehave.service.JBehaveUtil.getAnnotationTexts(JBehaveUtil.java:142)
	at com.github.kumaraman21.intellijbehave.service.JavaStepDefinition.getAnnotationTexts(JavaStepDefinition.java:103)
	at com.github.kumaraman21.intellijbehave.service.JavaStepDefinition.getStepMatchers(JavaStepDefinition.java:76)
	at com.github.kumaraman21.intellijbehave.service.JavaStepDefinition.matches(JavaStepDefinition.java:36)
	at com.github.kumaraman21.intellijbehave.service.JBehaveStepsIndex.findStepDefinitions(JBehaveStepsIndex.java:44)
	at com.github.kumaraman21.intellijbehave.resolver.StepPsiReference.multiResolve(StepPsiReference.java:119)
	at com.github.kumaraman21.intellijbehave.resolver.StepPsiReference.resolve(StepPsiReference.java:56)
	at com.intellij.codeInsight.TargetElementUtil.a(TargetElementUtil.java:391)
	at com.intellij.codeInsight.TargetElementUtil.b(TargetElementUtil.java:368)
	at com.intellij.codeInsight.TargetElementUtil.a(TargetElementUtil.java:238)
	at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:210)
	at com.intellij.codeInsight.navigation.actions.GotoDeclarationAction.findTargetElementsNoVS(GotoDeclarationAction.java:312)
	at com.intellij.codeInsight.navigation.actions.GotoDeclarationAction.findAllTargetElements(GotoDeclarationAction.java:279)
	at com.intellij.codeInsight.navigation.actions.GotoDeclarationAction.a(GotoDeclarationAction.java:92)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:899)
	at com.intellij.codeInsight.navigation.actions.GotoDeclarationAction.a(GotoDeclarationAction.java:151)
	at com.intellij.openapi.progress.impl.CoreProgressManager$5.run(CoreProgressManager.java:235)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:710)
	at com.intellij.openapi.progress.impl.CoreProgressManager$11.run(CoreProgressManager.java:423)
	at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:179)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:568)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:519)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:164)
	at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:572)
	at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:309)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)


java.lang.NullPointerException
	at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
	at java.util.regex.Matcher.reset(Matcher.java:309)
	at java.util.regex.Matcher.<init>(Matcher.java:229)
	at java.util.regex.Pattern.matcher(Pattern.java:1093)
	at org.jbehave.core.steps.PatternVariantBuilder.variantsFor(PatternVariantBuilder.java:140)
	at org.jbehave.core.steps.PatternVariantBuilder.<init>(PatternVariantBuilder.java:117)
	at com.github.kumaraman21.intellijbehave.service.JBehaveUtil$5.apply(JBehaveUtil.java:58)
	at com.github.kumaraman21.intellijbehave.service.JBehaveUtil$5.apply(JBehaveUtil.java:55)
	at com.google.common.collect.Iterators$8.transform(Iterators.java:799)
	at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
	at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
	at com.google.common.collect.Iterators$5.hasNext(Iterators.java:548)
	at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:314)
	at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:300)
	at com.google.common.collect.FluentIterable.toSet(FluentIterable.java:396)
	at com.github.kumaraman21.intellijbehave.service.JBehaveUtil.getAliasesAnnotationTexts(JBehaveUtil.java:181)
	at com.github.kumaraman21.intellijbehave.service.JBehaveUtil.getAnnotationTexts(JBehaveUtil.java:142)
	at com.github.kumaraman21.intellijbehave.service.JavaStepDefinition.getAnnotationTexts(JavaStepDefinition.java:103)
	at com.github.kumaraman21.intellijbehave.service.JavaStepDefinition.getStepMatchers(JavaStepDefinition.java:76)
	at com.github.kumaraman21.intellijbehave.service.JavaStepDefinition.matches(JavaStepDefinition.java:36)
	at com.github.kumaraman21.intellijbehave.service.JBehaveStepsIndex.findStepDefinitions(JBehaveStepsIndex.java:44)
	at com.github.kumaraman21.intellijbehave.resolver.StepPsiReference.resolveToDefinitions(StepPsiReference.java:109)
	at com.github.kumaraman21.intellijbehave.resolver.StepPsiReference.resolveToDefinition(StepPsiReference.java:102)
	at com.github.kumaraman21.intellijbehave.resolver.StoryAnnotator.annotate(StoryAnnotator.java:45)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:139)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:363)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:298)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:322)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:325)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:325)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:297)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:237)
	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:82)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:433)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1061)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:426)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:568)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:519)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:425)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:405)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:155)
	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)


java.lang.NullPointerException
	at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
	at java.util.regex.Matcher.reset(Matcher.java:309)
	at java.util.regex.Matcher.<init>(Matcher.java:229)
	at java.util.regex.Pattern.matcher(Pattern.java:1093)
	at org.jbehave.core.steps.PatternVariantBuilder.variantsFor(PatternVariantBuilder.java:140)
	at org.jbehave.core.steps.PatternVariantBuilder.<init>(PatternVariantBuilder.java:117)
	at com.github.kumaraman21.intellijbehave.service.JBehaveUtil$5.apply(JBehaveUtil.java:58)
	at com.github.kumaraman21.intellijbehave.service.JBehaveUtil$5.apply(JBehaveUtil.java:55)
	at com.google.common.collect.Iterators$8.transform(Iterators.java:799)
	at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
	at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
	at com.google.common.collect.Iterators$5.hasNext(Iterators.java:548)
	at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:314)
	at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:300)
	at com.google.common.collect.FluentIterable.toSet(FluentIterable.java:396)
	at com.github.kumaraman21.intellijbehave.service.JBehaveUtil.getAliasesAnnotationTexts(JBehaveUtil.java:181)
	at com.github.kumaraman21.intellijbehave.service.JBehaveUtil.getAnnotationTexts(JBehaveUtil.java:142)
	at com.github.kumaraman21.intellijbehave.service.JavaStepDefinition.getAnnotationTexts(JavaStepDefinition.java:103)
	at com.github.kumaraman21.intellijbehave.service.JavaStepDefinition.getStepMatchers(JavaStepDefinition.java:76)
	at com.github.kumaraman21.intellijbehave.service.JavaStepDefinition.matches(JavaStepDefinition.java:36)
	at com.github.kumaraman21.intellijbehave.service.JBehaveStepsIndex.findStepDefinitions(JBehaveStepsIndex.java:44)
	at com.github.kumaraman21.intellijbehave.resolver.StepPsiReference.multiResolve(StepPsiReference.java:119)
	at com.github.kumaraman21.intellijbehave.resolver.StepPsiReference.resolve(StepPsiReference.java:56)
	at com.intellij.codeInsight.intention.AddAnnotationPsiFix.getContainer(AddAnnotationPsiFix.java:73)
	at com.intellij.codeInsight.intention.impl.AddAnnotationIntention.isAvailable(AddAnnotationIntention.java:50)
	at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.isAvailable(IntentionActionWrapper.java:59)
	at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.availableFor(ShowIntentionActionsHandler.java:132)
	at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.a(ShowIntentionsPass.java:312)
	at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseBetweenHostAndInjected(ShowIntentionActionsHandler.java:157)
	at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.getActionsToShow(ShowIntentionsPass.java:311)
	at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.a(ShowIntentionsPass.java:243)
	at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.doCollectInformation(ShowIntentionsPass.java:219)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:433)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1061)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:426)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:568)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:519)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:425)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:405)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:155)
	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)



Plugin doesnt resolve any step if the step metod had multiple annotations

Plugin version: 1.51

Test method:

@Given("given the user do some test")
@Alias("given the user do some testing")
@When("when the user do some test")
@Then("then the user do some test")
public void doSomeTest() {
}

Test scenario:

Scenario: test scenario

Given given the user do some test
And given the user do some testing

When when the user do some test
Then then the user do some test

Plugin resolves only first step - Given given the user do some test.
Any help on this?

Change file extension in settings.

All our story files have the extension .feature.
This plugins simply doesn't work for us, and i think that's a trivial fix to implement.

Plugin doesn't find steps in a dependent jar

We are trying to split some of our step classes into a separate maven module that is in a separate maven project. For those step classes that we have moved into the new module their steps are showing up in our story files with a red underline meaning the plugin thinks the steps are not defined.

But that is not true. ;-) When we run our story using a jbehave runner we can see jbehave is able to find the steps. So the issue is with the jbehave support plugin v1.3.

Now this new module (jar) is added as a maven dependency and when looking at IntelliJ's module dependencies tab I can see our new jar (containing our steps) is listed. According to the plugin's wiki page it says the jbehave support plugin should scan the module classpath but it doesn't seem to be or I don't really understand what that statement on the wiki means???

Alternatively can you point me to the code where I can change the jbehave support plugin to widen its scan?

Otherwise this is a fantastic plugin and would be lost without it. Thanks so much. :)

Exception in plugin JBehave Support (1.54)

IntelliJ version 2021.2 (Ultimate Version)
Build #UI-212.4746.92 built on July 27, 2021
Runtime version 11.0.10+9-b1504.13 amd64

Following exception is thrown when opening IntelliJ:

Error while indexing /home//IdeaProjects//functiontest/src/test/resources/stories/*.story
To reindex this file IDEA has to be restarted

java.lang.NoClassDefFoundError: org/jbehave/core/configuration/Keywords
at com.github.kumaraman21.intellijbehave.highlighter.StoryLexerFactory.createLexer(StoryLexerFactory.java:13)
at com.github.kumaraman21.intellijbehave.highlighter.StorySyntaxHighlightingLexer.(StorySyntaxHighlightingLexer.java:22)
at com.github.kumaraman21.intellijbehave.highlighter.StorySyntaxHighlighter.getHighlightingLexer(StorySyntaxHighlighter.java:40)
at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.(LexerEditorHighlighter.java:58)
at com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl.createEditorHighlighter(EditorHighlighterFactoryImpl.java:28)
at com.intellij.openapi.fileTypes.FileTypeEditorHighlighterProviders$1.getEditorHighlighter(FileTypeEditorHighlighterProviders.java:40)
at com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl.createEditorHighlighter(EditorHighlighterFactoryImpl.java:66)
at com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl.createEditorHighlighter(EditorHighlighterFactoryImpl.java:83)
at com.intellij.ide.highlighter.HighlighterFactory.createHighlighter(HighlighterFactory.java:28)
at com.intellij.psi.impl.cache.impl.id.PlatformIdTableBuilding$TokenSetTodoIndexer.map(PlatformIdTableBuilding.java:108)
at com.intellij.psi.impl.cache.impl.id.PlatformIdTableBuilding$TokenSetTodoIndexer.map(PlatformIdTableBuilding.java:85)
at com.intellij.psi.impl.cache.impl.todo.TodoIndex$4.map(TodoIndex.java:103)
at com.intellij.psi.impl.cache.impl.todo.TodoIndex$4.map(TodoIndex.java:79)
at com.intellij.util.indexing.CompositeDataIndexer.map(CompositeDataIndexer.java:55)
at com.intellij.util.indexing.CompositeDataIndexer.map(CompositeDataIndexer.java:19)
at com.intellij.util.indexing.impl.MapReduceIndex.mapByIndexer(MapReduceIndex.java:328)
at com.intellij.util.indexing.impl.MapReduceIndex.mapInput(MapReduceIndex.java:318)
at com.intellij.util.indexing.impl.storage.VfsAwareMapReduceIndex.mapInput(VfsAwareMapReduceIndex.java:182)
at com.intellij.util.indexing.impl.storage.VfsAwareMapReduceIndex.mapInput(VfsAwareMapReduceIndex.java:47)
at com.intellij.util.indexing.impl.MapReduceIndex.mapInputAndPrepareUpdate(MapReduceIndex.java:263)
at com.intellij.indexing.composite.CompositeInvertedIndexBase.updateBaseIndex(CompositeInvertedIndexBase.java:232)
at com.intellij.indexing.composite.CompositeInvertedIndexBase.mapInputAndPrepareUpdate(CompositeInvertedIndexBase.java:55)
at com.intellij.indexing.composite.CompositeInvertedIndexBase.mapInputAndPrepareUpdate(CompositeInvertedIndexBase.java:26)
at com.intellij.util.indexing.FileBasedIndexImpl.updateSingleIndex(FileBasedIndexImpl.java:1520)
at com.intellij.util.indexing.FileBasedIndexImpl.lambda$doIndexFileContent$23(FileBasedIndexImpl.java:1394)
at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyIn(FileTypeManagerImpl.java:638)
at com.intellij.util.indexing.FileBasedIndexImpl.doIndexFileContent(FileBasedIndexImpl.java:1361)
at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1315)
at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.lambda$indexOneFileOfJob$5(IndexUpdateRunner.java:267)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:521)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$3(NonBlockingReadActionImpl.java:486)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1078)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:78)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:161)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:118)
at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:57)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:183)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:170)
at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:57)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:115)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:78)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:486)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.executeSynchronously(NonBlockingReadActionImpl.java:421)
at com.intellij.openapi.application.impl.NonBlockingReadActionImpl.executeSynchronously(NonBlockingReadActionImpl.java:186)
at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.indexOneFileOfJob(IndexUpdateRunner.java:270)
at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.lambda$indexJobsFairly$4(IndexUpdateRunner.java:210)
at com.intellij.openapi.progress.impl.ProgressSuspender.executeNonSuspendableSection(ProgressSuspender.java:83)
at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.indexJobsFairly(IndexUpdateRunner.java:213)
at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.lambda$doIndexFiles$3(IndexUpdateRunner.java:147)
at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:213)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:184)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.ClassNotFoundException: org.jbehave.core.configuration.Keywords PluginClassLoader(plugin=PluginDescriptor(name=JBehave Support, id=jbehave-support-plugin, descriptorPath=plugin.xml, path=~/.local/share/JetBrains/IntelliJIdea2021.2/IntelliJBehave.jar, version=1.54, package=null), packagePrefix=null, instanceId=244, state=active)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:254)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 64 more

JBehave Support Plugin 1.53 not supporting on IntelliJ

Latest Version of JBehave Support plugin has been failed to show Icon and Step Definition and also its not allows to Execute my Steps. My previous version of JBehave Support plugin all those actions are works fine.

System Details:
IntelliJ 2019.1
JBehave Support Plugin - 1.53
JBehave Support Extension - 1.02

Support for custom localized keywords

JBehave allows the use of custom localized keywords http://jbehave.org/reference/stable/stories-in-your-language.html specified as a Properties-file. It makes sense writing the stories in user's language and terms. That is why we use Finnish in our JBehave stories.

Now, as far as I've understood from the source code, it seems that the plugin would read the locale only from
!-- language: locale
comment in .story-file and use this to load the default localizations from JBehave's bundle.

However, there exists no localizations for Finnish in that bundle and thus a custom .properties file would be needed. Even if there was a localized keywords bundle, the keywords might still be different as JBehave allows the use of those custom properties file. Additionally, it makes no sense having to define keywords in every story while they are most likely all in the same language.

There should be an option in the JBehave-plugin page to select a .properties file to use as keywords instead of the default English one.

Error after updating the JBhave to version 1.54 in IntelliJ 2021.2

The following error tracking is the one below:

java.lang.NoClassDefFoundError: org/jbehave/core/configuration/Keywords
	at com.github.kumaraman21.intellijbehave.highlighter.StoryLexerFactory.createLexer(StoryLexerFactory.java:13)
	at com.github.kumaraman21.intellijbehave.highlighter.StorySyntaxHighlightingLexer.<init>(StorySyntaxHighlightingLexer.java:22)
	at com.github.kumaraman21.intellijbehave.highlighter.StorySyntaxHighlighter.getHighlightingLexer(StorySyntaxHighlighter.java:40)
	at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.<init>(LexerEditorHighlighter.java:58)
	at com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl.createEditorHighlighter(EditorHighlighterFactoryImpl.java:28)
	at com.intellij.openapi.fileTypes.FileTypeEditorHighlighterProviders$1.getEditorHighlighter(FileTypeEditorHighlighterProviders.java:40)
	at com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl.createEditorHighlighter(EditorHighlighterFactoryImpl.java:66)
	at com.intellij.openapi.fileEditor.impl.text.TextEditorImpl.loadEditorInBackground(TextEditorImpl.java:72)
	at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.loadEditorInBackground(PsiAwareTextEditorImpl.java:42)
	at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.lambda$scheduleLoading$0(AsyncEditorLoader.java:95)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:825)
	at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.lambda$scheduleLoading$1(AsyncEditorLoader.java:93)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:521)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$3(NonBlockingReadActionImpl.java:486)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1078)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:78)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:161)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:118)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:57)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:183)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:170)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:57)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:115)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:78)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:486)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:407)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:213)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:184)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.ClassNotFoundException: org.jbehave.core.configuration.Keywords PluginClassLoader(plugin=PluginDescriptor(name=JBehave Support, id=jbehave-support-plugin, descriptorPath=plugin.xml, path=~\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\212.4746.92.plugins\IntelliJBehave.jar, version=1.54, package=null), packagePrefix=null, instanceId=250, state=active)
	at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:254)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 41 more


java.lang.NoClassDefFoundError: org/jbehave/core/configuration/Keywords
	at com.github.kumaraman21.intellijbehave.highlighter.StoryLexerFactory.createLexer(StoryLexerFactory.java:13)
	at com.github.kumaraman21.intellijbehave.parser.StoryParserDefinition.createLexer(StoryParserDefinition.java:39)
	at com.intellij.lang.impl.PsiBuilderFactoryImpl.createBuilder(PsiBuilderFactoryImpl.java:33)
	at com.intellij.psi.tree.ILazyParseableElementType.doParseContents(ILazyParseableElementType.java:56)
	at com.intellij.psi.tree.IFileElementType.parseContents(IFileElementType.java:53)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.lambda$ensureParsed$2(LazyParseableElement.java:175)
	at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:481)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:174)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:226)
	at com.intellij.psi.impl.source.tree.CompositeElement.findLeafElementAt(CompositeElement.java:126)
	at com.intellij.psi.impl.source.tree.CompositeElement.findLeafElementAt(CompositeElement.java:33)
	at com.intellij.psi.AbstractFileViewProvider.findElementAt(AbstractFileViewProvider.java:246)
	at com.intellij.psi.SingleRootFileViewProvider.findElementAt(SingleRootFileViewProvider.java:228)
	at com.intellij.psi.impl.source.PsiFileImpl.findElementAt(PsiFileImpl.java:523)
	at com.intellij.psi.util.PsiUtilCore.getLanguageAtOffset(PsiUtilCore.java:567)
	at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.getLanguageAtCurrentPositionInEditor(TextEditorPsiDataProvider.java:204)
	at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.getSlowData(TextEditorPsiDataProvider.java:150)
	at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.getSlowData(TextEditorPsiDataProvider.java:156)
	at com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider.lambda$getData$0(TextEditorPsiDataProvider.java:93)
	at com.intellij.ide.impl.DataManagerImpl.getSlowData(DataManagerImpl.java:137)
	at com.intellij.ide.impl.DataManagerImpl.lambda$getDataRule$2(DataManagerImpl.java:107)
	at com.intellij.ide.impl.DataManagerImpl.getDataFromProvider(DataManagerImpl.java:73)
	at com.intellij.openapi.actionSystem.impl.PreCachedDataContext.getData(PreCachedDataContext.java:126)
	at com.intellij.openapi.actionSystem.DataContext.getData(DataContext.java:42)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.ensureSlowDataKeysPreCached(ActionUpdater.java:344)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$14(ActionUpdater.java:273)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1078)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$16(ActionUpdater.java:298)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:161)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$17(ActionUpdater.java:295)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:183)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:170)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:270)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$18(ActionUpdater.java:294)
	at com.intellij.codeWithMe.ClientId$Companion.withClientId(ClientId.kt:135)
	at com.intellij.codeWithMe.ClientId.withClientId(ClientId.kt)
	at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$expandActionGroupAsync$19(ActionUpdater.java:292)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:213)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:184)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.ClassNotFoundException: org.jbehave.core.configuration.Keywords PluginClassLoader(plugin=PluginDescriptor(name=JBehave Support, id=jbehave-support-plugin, descriptorPath=plugin.xml, path=~\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\212.4746.92.plugins\IntelliJBehave.jar, version=1.54, package=null), packagePrefix=null, instanceId=250, state=active)
	at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:254)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 52 more

IDE Fatal Error after upgrading to 1.3

Hi guys,

I've just started using your plugin, great work thanks. I upgraded to 1.3 of the plugin in the last few days running on IntelliJ 13.1.1 and just noticed a flashing icon of an exclamation mark on the bottom right of the screen. When I click on it I see that an exception occurred in the plugin yesterday. Not a great drama as everything carried on ok and I didn't notice anything. I'm not sure what I was actually doing when the error occurred but I thought you might like the stacktrace (below) in case you want to fix.

Thanks,
Stuart


String index out of range: -1: String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1875)
at com.github.kumaraman21.intellijbehave.parser.StepPsiElement.getStepText(StepPsiElement.java:56)
at com.github.kumaraman21.intellijbehave.resolver.StepPsiReference.stepDefinitionAnnotation(StepPsiReference.java:56)
at com.github.kumaraman21.intellijbehave.resolver.StoryAnnotator.annotate(StoryAnnotator.java:36)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:160)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:103)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$5.run(GeneralHighlightingPass.java:312)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:397)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$300(GeneralHighlightingPass.java:64)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$6.run(GeneralHighlightingPass.java:403)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:87)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:400)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$300(GeneralHighlightingPass.java:64)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$6.run(GeneralHighlightingPass.java:403)
at com.intellij.codeInsight.daemon.impl.RefCountHolder.analyze(RefCountHolder.java:298)
at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.analyze(HighlightVisitorImpl.java:172)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:400)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:388)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:230)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:86)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:61)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:380)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1153)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:371)
at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:368)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:344)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask.exec(JobLauncherImpl.java:193)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:109)

NPE in IDEA 2016.2 on application open

Good day!
Could you, please, take a look at this exception?

null
java.lang.NullPointerException
    at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
    at java.util.regex.Matcher.reset(Matcher.java:309)
    at java.util.regex.Matcher.<init>(Matcher.java:229)
    at java.util.regex.Pattern.matcher(Pattern.java:1093)
    at org.jbehave.core.steps.PatternVariantBuilder.variantsFor(PatternVariantBuilder.java:140)
    at org.jbehave.core.steps.PatternVariantBuilder.<init>(PatternVariantBuilder.java:117)
    at com.github.kumaraman21.intellijbehave.service.JBehaveUtil$5.apply(JBehaveUtil.java:58)
    at com.github.kumaraman21.intellijbehave.service.JBehaveUtil$5.apply(JBehaveUtil.java:55)
    at com.google.common.collect.Iterators$8.transform(Iterators.java:799)
    at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
    at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
    at com.google.common.collect.Iterators$5.hasNext(Iterators.java:548)
    at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:318)
    at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:300)
    at com.google.common.collect.FluentIterable.toSet(FluentIterable.java:396)
    at com.github.kumaraman21.intellijbehave.service.JBehaveUtil.getAliasesAnnotationTexts(JBehaveUtil.java:181)
    at com.github.kumaraman21.intellijbehave.service.JBehaveUtil.getAnnotationTexts(JBehaveUtil.java:142)
    at com.github.kumaraman21.intellijbehave.service.JavaStepDefinition.getAnnotationTexts(JavaStepDefinition.java:103)
    at com.github.kumaraman21.intellijbehave.service.JavaStepDefinition.getStepMatchers(JavaStepDefinition.java:76)
    at com.github.kumaraman21.intellijbehave.service.JavaStepDefinition.matches(JavaStepDefinition.java:36)
    at com.github.kumaraman21.intellijbehave.service.JBehaveStepsIndex.findStepDefinitions(JBehaveStepsIndex.java:44)
    at com.github.kumaraman21.intellijbehave.resolver.StepPsiReference.resolveToDefinitions(StepPsiReference.java:109)
    at com.github.kumaraman21.intellijbehave.resolver.StepPsiReference.resolveToDefinition(StepPsiReference.java:102)
    at com.github.kumaraman21.intellijbehave.codeInspector.UndefinedStepInspection$1.visitElement(UndefinedStepInspection.java:62)
    at com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:274)
    at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:81)
    at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:69)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:286)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:254)
    at com.intellij.concurrency.ApplierCompleter.a(ApplierCompleter.java:123)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1026)
    at com.intellij.concurrency.ApplierCompleter.a(ApplierCompleter.java:96)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:494)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
    at com.intellij.concurrency.ApplierCompleter.b(ApplierCompleter.java:106)
    at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:91)
    at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
    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)

Highlight when number of arguments in annotation does not match number of input parameters

When developing new steps using Jbehave you might face an issue when you create a step like:

@When("I do action with item")
public static void IDoActionWith(String item){}

This step would not be found by JBehave as a number of parameters in the annotation( 0 params) does not match with method signature(1 param).

It would be good to highlight such steps either in code or in story-files.

Can't find steps in Lifecycle section

Lifecycle:
Before:
Given running Docker container
After:
Outcome: ANY
Given a stopped container

@given("running $name container")
public void startContainer(String name) throws URISyntaxException { ..

It runs without any error but IDEA reports there are errors, check attached image:
screenshot from 2015-01-12 13 24 46

Major performance problem when Indexing files. Out of Memory message.

Whenever we enable this plugin, we always get this out of memory error multiple times while indexing files. It's really annoying and makes the plugin almost unusable.

out-of-memory

Increasing the XmX value helps, but even putting a very high value, it makes it only appear less often but still is very annoying.

No definition found for step

Hi! I've updated to plugin version 1.2 and some steps becomes undefined.
Here is definition example:
Given that the FIRST stock is an underlying of the SECOND stock

And implementation:

@Given("that the $index1 stock is an underlying of the $index2 stock")
public void givenThatTheStockIsAnUnderlyingOfTheStock(Index index1, Index index2)

Could you please check what was happening?

IDEA 13.0.3
JRE 1.7.0_40-b43 amd64

Thanks in advance!

Best regards,
Paul

java.lang.NoClassDefFoundError upon plugin initialization (v 1.54, IntelliJ 2021.1.3)

Upon starting IntelliJ 2021.13, with the plugin version 1.54 installed and enabled, an error in the plugin initialization is reported, with the following stack trace:

java.lang.NoClassDefFoundError: org/jbehave/core/configuration/Keywords
	at com.github.kumaraman21.intellijbehave.highlighter.StoryLexerFactory.createLexer(StoryLexerFactory.java:13)
	at com.github.kumaraman21.intellijbehave.parser.StoryParserDefinition.createLexer(StoryParserDefinition.java:39)
	at com.intellij.lang.impl.PsiBuilderFactoryImpl.createLexer(PsiBuilderFactoryImpl.java:55)
	at com.intellij.lang.impl.PsiBuilderFactoryImpl.createBuilder(PsiBuilderFactoryImpl.java:37)
	at com.intellij.psi.tree.ILazyParseableElementType.doParseContents(ILazyParseableElementType.java:79)
	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.findLeafElementAt(CompositeElement.java:126)
	at com.intellij.psi.impl.source.tree.CompositeElement.findLeafElementAt(CompositeElement.java:33)
	at com.intellij.psi.AbstractFileViewProvider.findElementAt(AbstractFileViewProvider.java:246)
	at com.intellij.psi.SingleRootFileViewProvider.findElementAt(SingleRootFileViewProvider.java:229)
	at com.intellij.psi.impl.source.PsiFileImpl.findElementAt(PsiFileImpl.java:521)
	at com.intellij.ide.navigationToolbar.StructureAwareNavBarModelExtension.getLeafElement(StructureAwareNavBarModelExtension.kt:38)
	at com.intellij.ide.navigationToolbar.NavBarModel.createModel(NavBarModel.java:146)
	at com.intellij.ide.navigationToolbar.NavBarModel.lambda$updateModelAsync$0(NavBarModel.java:105)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:521)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$3(NonBlockingReadActionImpl.java:468)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1096)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:79)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:157)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:119)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:57)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
	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.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:57)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:116)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:79)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:486)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:408)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:213)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:184)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.ClassNotFoundException: org.jbehave.core.configuration.Keywords PluginClassLoader(plugin=PluginDescriptor(name=JBehave Support, id=jbehave-support-plugin, descriptorPath=plugin.xml, path=~/.local/share/JetBrains/IntelliJIdea2021.1/IntelliJBehave.jar, version=1.54, package=null), packagePrefix=null, instanceId=166, state=active)
	at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:215)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 47 more

This renders the plugin non-functional.

Exception in plugin JBehave Support (1.53)

IntelliJ version 2021.1 (Ultimate Version)
Build #UI-211.6693.111 built on April 6, 2021
Runtime version 11.0.10+9-b1341.35 amd64

Following exception is thrown when opening IntelliJ:

Should be called at least in the state COMPONENTS_LOADED, the current state is: CONFIGURATION_STORE_INITIALIZED
Current violators count: 1

java.lang.Throwable
at com.intellij.diagnostic.LoadingState.logStateError(LoadingState.java:53)
at com.intellij.diagnostic.LoadingState.checkOccurred(LoadingState.java:49)
at com.intellij.psi.tree.IElementType.(IElementType.java:100)
at com.intellij.psi.search.scope.packageSet.lexer.ScopeTokenType.(ScopeTokenType.java:29)
at com.intellij.psi.search.scope.packageSet.lexer.ScopeTokenTypes.(ScopeTokenTypes.java:26)
at com.intellij.psi.search.scope.packageSet.lexer._ScopesLexer.advance(_ScopesLexer.java:643)
at com.intellij.lexer.FlexAdapter.locateToken(FlexAdapter.java:93)
at com.intellij.lexer.FlexAdapter.getTokenType(FlexAdapter.java:52)
at com.intellij.psi.search.scope.packageSet.PackageSetFactoryImpl$Parser.parseTerm(PackageSetFactoryImpl.java:108)
at com.intellij.psi.search.scope.packageSet.PackageSetFactoryImpl$Parser.parseIntersection(PackageSetFactoryImpl.java:97)
at com.intellij.psi.search.scope.packageSet.PackageSetFactoryImpl$Parser.parseUnion(PackageSetFactoryImpl.java:87)
at com.intellij.psi.search.scope.packageSet.PackageSetFactoryImpl$Parser.parse(PackageSetFactoryImpl.java:80)
at com.intellij.psi.search.scope.packageSet.PackageSetFactoryImpl.compile(PackageSetFactoryImpl.java:69)
at com.intellij.psi.search.scope.packageSet.NamedScopesHolder.readScope(NamedScopesHolder.java:148)
at com.intellij.psi.search.scope.packageSet.NamedScopesHolder.loadState(NamedScopesHolder.java:162)
at com.intellij.psi.search.scope.packageSet.NamedScopeManager.loadState(NamedScopeManager.java:36)
at com.intellij.psi.search.scope.packageSet.NamedScopeManager.loadState(NamedScopeManager.java:21)
at com.intellij.configurationStore.ComponentStoreImpl.doInitComponent(ComponentStoreImpl.kt:440)
at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:372)
at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:123)
at com.intellij.serviceContainer.ComponentManagerImpl.initializeComponent$intellij_platform_serviceContainer(ComponentManagerImpl.kt:433)
at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:53)
at com.intellij.serviceContainer.ServiceComponentAdapter.access$createAndInitialize(ServiceComponentAdapter.kt:13)
at com.intellij.serviceContainer.ServiceComponentAdapter$doCreateInstance$1.run(ServiceComponentAdapter.kt:43)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:213)
at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:42)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:110)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:64)
at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:488)
at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:471)
at com.intellij.openapi.project.impl.DefaultProject.getService(DefaultProject.java:209)
at com.intellij.psi.search.scope.packageSet.NamedScopeManager.getInstance(NamedScopeManager.java:31)
at com.intellij.packageDependencies.DependencyValidationManagerImpl.(DependencyValidationManagerImpl.java:58)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:52)
at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:771)
at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:49)
at com.intellij.serviceContainer.ServiceComponentAdapter.access$createAndInitialize(ServiceComponentAdapter.kt:13)
at com.intellij.serviceContainer.ServiceComponentAdapter$doCreateInstance$1.run(ServiceComponentAdapter.kt:43)
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.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:218)
at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:42)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:110)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:64)
at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:488)
at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:471)
at com.intellij.openapi.project.impl.DefaultProject.getService(DefaultProject.java:209)
at com.intellij.packageDependencies.DependencyValidationManager.getInstance(DependencyValidationManager.java:16)
at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl.(DaemonCodeAnalyzerImpl.java:107)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:52)
at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:771)
at com.intellij.serviceContainer.MyComponentAdapter.doCreateInstance(MyComponentAdapter.kt:35)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:110)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:64)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance$default(BaseComponentAdapter.kt:57)
at com.intellij.serviceContainer.ComponentManagerImpl.createComponents(ComponentManagerImpl.kt:340)
at com.intellij.openapi.project.impl.DefaultProjectImpl.init(DefaultProject.java:306)
at com.intellij.openapi.project.impl.DefaultProject$1.init(DefaultProject.java:53)
at com.intellij.openapi.project.impl.DefaultProjectTimed.get(DefaultProjectTimed.java:33)
at com.intellij.openapi.project.impl.DefaultProject.getDelegate(DefaultProject.java:130)
at com.intellij.openapi.project.impl.DefaultProject.getMessageBus(DefaultProject.java:234)
at com.intellij.openapi.project.impl.ProjectManagerImpl.getDefaultProject(ProjectManagerImpl.java:204)
at com.intellij.ide.fileTemplates.FileTemplateManager.getDefaultInstance(FileTemplateManager.java:70)
at com.intellij.ide.fileTemplates.FileTemplateManager.getInstance(FileTemplateManager.java:66)
at com.github.kumaraman21.intellijbehave.template.JBehaveTemplateLoaderComponent.initComponent(JBehaveTemplateLoaderComponent.java:33)
at com.intellij.serviceContainer.MyComponentAdapter.doCreateInstance(MyComponentAdapter.kt:44)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:110)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:64)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance$default(BaseComponentAdapter.kt:57)
at com.intellij.serviceContainer.ComponentManagerImpl.createComponents(ComponentManagerImpl.kt:340)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$loadComponents$5(ApplicationImpl.java:342)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
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.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
at com.intellij.openapi.application.impl.ApplicationImpl.loadComponents(ApplicationImpl.java:342)
at com.intellij.idea.ApplicationLoader$startApp$6$loadComponentInEdtFuture$1.run(ApplicationLoader.kt:198)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:218)
at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:200)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:319)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:84)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:133)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46)
at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:189)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:419)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Comment / Uncomment should be using '!-- ' instead of '!--'

I'm using latest plugin version 1.52. The feature "Comment/uncomment lines in story files" has and issue: when I press "comment" on a scenario line, IDE prepends line with "!--" sequence. Jbehave (4.0.1) does not consider it as a token since it's not separated by space from the rest of the line, so it 1) indicates this line as Pending instead of Skipped and also 2) considers it to be continuation of previous line, marking it as Pending as well.

Expected: insert and delete "!-- " on comment/uncomment.

Migrate project to Java 11

The scope of this issue is:

  • configuring the project to build with Java 11
  • use lambdas and other Java language features
  • migrate fluent lists, functions, predicates and other stuff from Guava to their corresponding Java features.

PsiLiteralExpressionImpl cannot be cast to com.intellij.psi.PsiArrayInitializerMemberValue

Hi

I installed your nice plugin, but I get the following exception (it is repeatedly thrown every X minutes):

com.intellij.psi.impl.source.tree.java.PsiLiteralExpressionImpl cannot be cast to com.intellij.psi.PsiArrayInitializerMemberValue
java.lang.ClassCastException: com.intellij.psi.impl.source.tree.java.PsiLiteralExpressionImpl cannot be cast to com.intellij.psi.PsiArrayInitializerMemberValue
    at com.github.kumaraman21.intellijbehave.service.JBehaveUtil.getAliasesAnnotationTexts(JBehaveUtil.java:173)
    at com.github.kumaraman21.intellijbehave.service.JBehaveUtil.getAnnotationTexts(JBehaveUtil.java:142)
    at com.github.kumaraman21.intellijbehave.service.JavaStepDefinition.getAnnotationTexts(JavaStepDefinition.java:103)
    at com.github.kumaraman21.intellijbehave.service.JavaStepDefinition.getStepMatchers(JavaStepDefinition.java:76)
    at com.github.kumaraman21.intellijbehave.service.JavaStepDefinition.matches(JavaStepDefinition.java:36)
    at com.github.kumaraman21.intellijbehave.service.JBehaveStepsIndex.findStepDefinitions(JBehaveStepsIndex.java:44)
    at com.github.kumaraman21.intellijbehave.resolver.StepPsiReference.resolveToDefinitions(StepPsiReference.java:109)
    at com.github.kumaraman21.intellijbehave.resolver.StepPsiReference.resolveToDefinition(StepPsiReference.java:102)
    at com.github.kumaraman21.intellijbehave.codeInspector.UndefinedStepInspection$1.visitElement(UndefinedStepInspection.java:62)
    at com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:274)
    at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:80)
    at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:69)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.runToolOnElements(LocalInspectionsPass.java:289)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.access$000(LocalInspectionsPass.java:75)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$2.process(LocalInspectionsPass.java:258)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$2.process(LocalInspectionsPass.java:255)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:122)
    at com.intellij.concurrency.ApplierCompleter.access$000(ApplierCompleter.java:44)
    at com.intellij.concurrency.ApplierCompleter$1.run(ApplierCompleter.java:85)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1146)
    at com.intellij.concurrency.ApplierCompleter$2.run(ApplierCompleter.java:94)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.registerIndicatorAndRun(ProgressManagerImpl.java:281)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.registerIndicatorAndRun(ProgressManagerImpl.java:278)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:233)
    at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:106)
    at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:82)
    at jsr166e.CountedCompleter.exec(CountedCompleter.java:684)
    at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
    at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
    at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
    at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
    at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:109)

Also, navigating to the step method by hitting CTRL+B in a story is not working. I guess it is related to the exception.

Thanks in advance for any hint.

Incompatible with 2021.1.3

image
It still works fine on my old machine where I have the plugin installed, but is unable to install on my new machine because it is "marked as incompatible" I see in your build.gradle file you have "jbehave.updateSinceUntilBuild false" which should work, but apparently is not working properly.

Problem with reading example tables

When trying to open some scenarios with example tables, the plugin consumes high CPU and memory until IDEA complains about an out of memory error, at 2GB of memory.
The IDE never opens the affected scenario, but can open other scenarios without example tables. Same behaviour for IDEA 12 and 13.

Example of a scenario that causes this:
Description: Verify that the configuration and application definition are sane
Meta: @story Configuration

Scenario: Verify that all configured user accounts can login correctly
Meta: @id config_login_ok
Given a fresh application
And the login page
And the username
And the password
When the user logs in
Then the user is logged in
Examples:
users.table

And the file users.table contains:
|username |password |
|alice |password |
|bob |password |
|admin |password |

*.story file autocompletion crashes InteliiJ

Hello

First off, very cool plugin and very helpful.
I am having an issue when the auto completion popup comes up in story files, it just freezes my IntelliJ and makes me force quit the application.
There is nothing in the idea logs but there is however threadDump-freeze-* folder:
threadDumps-freeze-20190204-104700-IU-183.5429.30.zip

The auto-completion happens automatically and cannot be turned off f.e. for certain file types.
You can also turn it off completely in IntelliJ but that is not what I want.

Some more info:

  • IntelliJ version:
    image 10
  • amount of lines in *.story files in our repo: 4500+
  • it doesn't happen on every auto-completion, usually on lines that occur a lot (500+)

Side-note:
I tried reproducing and looking into this by cherry-picking this repo and setting it up as a plugin development project but ran into some issues:

  • Setting this up as a plugin development project is harder than expected. Especially with maven, I switched to gradle where the setup is easier in my opnion.
    My build.gradle looks like this:
buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.20"
    }
}

plugins {
    id("org.jetbrains.kotlin.jvm") version "1.3.20"
    id("org.jetbrains.intellij") version "0.3.12"
    id("idea")
}

apply plugin: 'java'
apply plugin: 'maven'

group = 'com.github.witspirit'
version = '1.3-SNAPSHOT'

description = """IntelliJ Behave Dependencies"""

sourceCompatibility = 1.5
targetCompatibility = 1.5
tasks.withType(JavaCompile) {
    options.encoding = 'UTF-8'
}

sourceSets {
    main {
        java {
            srcDirs = ['src']
        }
        resources {
            srcDirs = ['resources']
        }
        kotlin {
            srcDirs = ['src']
        }
    }
    test {
        java {
            srcDirs = ['test']
        }
        resources {
            srcDirs = ['testData']
        }
    }
}

intellij {
    version = "2018.2.3"
    setPlugins("org.jetbrains.kotlin:1.3.20-release-IJ2018.2-1")
}

repositories {
        
     maven { url "http://repo.maven.apache.org/maven2" }
}

dependencies {
    compile group: 'org.jbehave', name: 'jbehave-core', version:'3.9.4'
    compile group: 'org.hamcrest', name: 'hamcrest-all', version:'1.3'
    compile group: 'com.google.guava', name: 'guava', version:'18.0'
    testCompile group: 'junit', name: 'junit', version:'4.11'
    testCompile group: 'org.easytesting', name: 'fest-util', version:'1.2.5'
    testCompile group: 'org.easytesting', name: 'fest-assert-core', version:'2.0M10'
    testCompile group: 'org.mockito', name: 'mockito-all', version:'1.9.5'
}
  • This does not compile since the plugin seems to be compiled against an older version of the kotlin plugin.
    Error:
14:17:37: Executing task 'verifyPlugin'...

Parallel execution is an incubating feature.

> Task :compileKotlin FAILED
w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
    /Users/jeno/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2018.2.3/5bf630fc05fecf70296acb604313cc71a2134984/ideaIC-2018.2.3/lib/kotlin-stdlib-jdk8.jar (version 1.2)
    /Users/jeno/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2018.2.3/5bf630fc05fecf70296acb604313cc71a2134984/ideaIC-2018.2.3/lib/kotlin-stdlib.jar (version 1.2)
    /Users/jeno/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2018.2.3/5bf630fc05fecf70296acb604313cc71a2134984/ideaIC-2018.2.3/lib/kotlin-reflect.jar (version 1.2)
    /Users/jeno/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2018.2.3/5bf630fc05fecf70296acb604313cc71a2134984/ideaIC-2018.2.3/lib/kotlin-stdlib-jdk7.jar (version 1.2)
    /Users/jeno/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/unzipped.com.jetbrains.plugins/org.jetbrains.kotlin-1.3.20-release-IJ2018.2-1/Kotlin/lib/kotlin-stdlib-jdk8.jar (version 1.3)
    /Users/jeno/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/unzipped.com.jetbrains.plugins/org.jetbrains.kotlin-1.3.20-release-IJ2018.2-1/Kotlin/lib/kotlin-stdlib-common.jar (version 1.3)
    /Users/jeno/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/unzipped.com.jetbrains.plugins/org.jetbrains.kotlin-1.3.20-release-IJ2018.2-1/Kotlin/lib/kotlin-stdlib.jar (version 1.3)
    /Users/jeno/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/unzipped.com.jetbrains.plugins/org.jetbrains.kotlin-1.3.20-release-IJ2018.2-1/Kotlin/lib/kotlin-script-runtime.jar (version 1.3)
    /Users/jeno/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/unzipped.com.jetbrains.plugins/org.jetbrains.kotlin-1.3.20-release-IJ2018.2-1/Kotlin/lib/kotlin-reflect.jar (version 1.3)
    /Users/jeno/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/unzipped.com.jetbrains.plugins/org.jetbrains.kotlin-1.3.20-release-IJ2018.2-1/Kotlin/lib/kotlin-stdlib-jdk7.jar (version 1.3)
w: Consider providing an explicit dependency on kotlin-reflect 1.3 to prevent strange errors
w: Some runtime JAR files in the classpath have an incompatible version. Consider removing them from the classpath
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/psi/NavigableKotlinPsiAnnotation.kt: (5, 33): Unresolved reference: JetElement
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/psi/NavigableKotlinPsiAnnotation.kt: (12, 21): Unresolved reference: JetElement
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/psi/NavigableKotlinPsiElement.kt: (6, 33): Unresolved reference: JetElement
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/psi/NavigableKotlinPsiElement.kt: (13, 33): Unresolved reference: JetElement
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/psi/NavigableKotlinPsiElement.kt: (22, 34): Unresolved reference: JetElement
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/psi/NavigableKotlinPsiMethod.kt: (5, 33): Unresolved reference: JetElement
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/psi/NavigableKotlinPsiMethod.kt: (12, 21): Unresolved reference: JetElement
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/support/services/KotlinAnnotationsLoader.kt: (9, 44): Unresolved reference: JetAnnotationsIndex
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/support/services/KotlinAnnotationsLoader.kt: (10, 33): Unresolved reference: JetFunction
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/support/services/KotlinAnnotationsLoader.kt: (29, 13): Unresolved reference: JetAnnotationsIndex
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/support/services/KotlinAnnotationsLoader.kt: (30, 35): Cannot infer a type for this parameter. Please specify it explicitly.
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/support/services/KotlinAnnotationsLoader.kt: (32, 73): Unresolved reference: JetFunction
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/support/services/KotlinPsiClassesLoader.kt: (5, 33): Unresolved reference: JetClass
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/support/services/KotlinPsiClassesLoader.kt: (6, 33): Unresolved reference: JetFile
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/support/services/KotlinPsiClassesLoader.kt: (21, 58): Unresolved reference: JetFile
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/support/services/KotlinPsiClassesLoader.kt: (22, 17): Unresolved reference: declarations
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/support/services/KotlinPsiClassesLoader.kt: (23, 39): Unresolved reference: getPsiClass
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/support/services/KotlinPsiClassesLoader.kt: (23, 51): Unresolved reference: it
e: /Users/jeno/git/IntelliJBehave/src/com/github/kumaraman21/intellijbehave/kotlin/support/services/KotlinPsiClassesLoader.kt: (23, 58): Unresolved reference: JetClass

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileKotlin'.
> Compilation error. See log for more details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
1 actionable task: 1 executed
Compilation error. See log for more details
14:17:39: Task execution finished 'verifyPlugin'.

IntelliJ Idea getting stuck when the plugin is enabled

Plugin v1.52

We have nearly 400 story files having more than 1 million lines. Once we enabled the plugin and after few seconds IntelliJ Idea will be stuck and we'll have to kill the process and restart the IDE. But then again it happens until disable the plugin.

This has been a huge issue for us and about 30 automation engineers are blocked. Looking for an immediate solution.

Add support for Kotlin

Hi, I added support for Kotlin to this project some weeks ago, so I would like you to accept my contribution. :)

No idea how to find the problem

When I run my tests and I have a failure I just get a verbose output (hundreds of lines) and I have no which tests is failing or why

Code Reformat

The stories doesnot refotmat with correct identation and correct tabular representation of examples.

NPE Exception with IntelliJ 13.0.2

When I click on JBehave entry in Settings window, it only shows the loading message.

jbehave_on_intellij_13 0 2

Besides, the console outputs following error message.

[ 27459] ERROR - plication.impl.ApplicationImpl - null
java.lang.NullPointerException
at com.github.kumaraman21.intellijbehave.settings.JBehaveSettingsPanel.(JBehaveSettingsPanel.java:47)
at com.github.kumaraman21.intellijbehave.settings.JBehaveConfigurable.createComponent(JBehaveConfigurable.java:53)
at com.intellij.openapi.options.newEditor.OptionsEditor$Simple.(OptionsEditor.java:1303)
at com.intellij.openapi.options.newEditor.OptionsEditor.b(OptionsEditor.java:461)
at com.intellij.openapi.options.newEditor.OptionsEditor.access$2500(OptionsEditor.java:68)
at com.intellij.openapi.options.newEditor.OptionsEditor$9$1$1.run(OptionsEditor.java:430)
at com.intellij.openapi.application.impl.ApplicationImpl.runEdtSafeAction(ApplicationImpl.java:1098)
at com.intellij.openapi.options.newEditor.OptionsEditor$9$1.run(OptionsEditor.java:423)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:908)
at com.intellij.openapi.options.newEditor.OptionsEditor$9.run(OptionsEditor.java:420)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:420)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:150)
[ 27464] ERROR - plication.impl.ApplicationImpl - IntelliJ IDEA 13.0.2 Build #IU-133.696
[ 27464] ERROR - plication.impl.ApplicationImpl - JDK: 1.7.0_51
[ 27464] ERROR - plication.impl.ApplicationImpl - VM: Java HotSpot(TM) 64-Bit Server VM
[ 27464] ERROR - plication.impl.ApplicationImpl - Vendor: Oracle Corporation
[ 27464] ERROR - plication.impl.ApplicationImpl - OS: Linux
[ 27465] ERROR - plication.impl.ApplicationImpl - Last Action: WelcomeScreen.Settings
[ 38956] WARN - api.vfs.impl.local.FileWatcher - Watcher terminated with exit code 0

Exception in Intellij 2021.3

When enabling the plugin version 1.54 in Intellij 2021.3 I get the following exception:

java.lang.NoClassDefFoundError: org/jbehave/core/configuration/Keywords
	at com.github.kumaraman21.intellijbehave.highlighter.StoryLexerFactory.createLexer(StoryLexerFactory.java:13)
	at com.github.kumaraman21.intellijbehave.highlighter.StorySyntaxHighlightingLexer.<init>(StorySyntaxHighlightingLexer.java:22)
	at com.github.kumaraman21.intellijbehave.highlighter.StorySyntaxHighlighter.getHighlightingLexer(StorySyntaxHighlighter.java:40)
	at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.<init>(LexerEditorHighlighter.java:58)
	at com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl.createEditorHighlighter(EditorHighlighterFactoryImpl.java:28)
	at com.intellij.openapi.fileTypes.FileTypeEditorHighlighterProviders$1.getEditorHighlighter(FileTypeEditorHighlighterProviders.java:40)
	at com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl.createEditorHighlighter(EditorHighlighterFactoryImpl.java:66)
	at com.intellij.openapi.fileEditor.impl.text.TextEditorImpl.loadEditorInBackground(TextEditorImpl.java:72)
	at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.loadEditorInBackground(PsiAwareTextEditorImpl.java:42)
	at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.lambda$scheduleLoading$0(AsyncEditorLoader.java:95)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
	at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.lambda$scheduleLoading$1(AsyncEditorLoader.java:93)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:521)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$3(NonBlockingReadActionImpl.java:486)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1084)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:75)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:158)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:115)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:57)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:624)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:698)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:646)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:623)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:57)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:112)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:75)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:486)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:407)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:246)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:32)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:225)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:213)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:214)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.ClassNotFoundException: org.jbehave.core.configuration.Keywords PluginClassLoader(plugin=PluginDescriptor(name=JBehave Support, id=jbehave-support-plugin, descriptorPath=plugin.xml, path=~\AppData\Roaming\JetBrains\IntelliJIdea2021.3\plugins\IntelliJBehave.jar, version=1.54, package=null, isBundled=false), packagePrefix=null, instanceId=225, state=active)
	at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:235)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 43 more

We are using the following gradle dependencies:

implementation "org.jbehave:jbehave-core:4.5.1"
implementation "org.jbehave:jbehave-spring:4.5.1"

Run *.story files

I saw that plugin should support to run JBehave story from *.story file. Can not do this. only via java class that extends JUnitStory :(

Limit the scope of steps to the same package - how?

Hi!,
I'd like to contribute... just wondering if you can point me in the right direction. I'd like to be able to limit the scope of where the plugin searches for steps - for use by the autocompleter, the Ctrl-click functionality and the "step not implemented" checker.

Can you give me an idea of where I might start to implement this? For a given story, I just want .story files and Java classes that have the exact same package to be considered in scope with each other for step resolution.

Broken in IntelliJ 14

Can no longer navigate from annotation to story file.
On command click, a red tooltip displays: "Cannot find declarations to go to".

intellijbehave.settings.JBehaveSettings requested as a service, but it is a component

StackTrace:

com.intellij.diagnostic.PluginException: com.github.kumaraman21.intellijbehave.settings.JBehaveSettings requested as a service, but it is a component - convert it to a service or change call to ApplicationManager.getApplication().getComponent() [Plugin: jbehave-support-plugin]
at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:405)
at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:58)
at com.intellij.diagnostic.PluginException.logPluginError(PluginException.java:75)
at com.intellij.serviceContainer.PlatformComponentManagerImpl.getService(PlatformComponentManagerImpl.kt:308)
at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:18)
at com.github.kumaraman21.intellijbehave.settings.JBehaveSettings.getInstance(JBehaveSettings.java:34)
at com.github.kumaraman21.intellijbehave.settings.JBehaveSettingsPanel.(JBehaveSettingsPanel.java:52)
at com.github.kumaraman21.intellijbehave.settings.JBehaveConfigurable.createComponent(JBehaveConfigurable.java:53)
at com.intellij.openapi.options.ex.ConfigurableWrapper.createComponent(ConfigurableWrapper.java:158)
at com.intellij.openapi.options.ex.ConfigurableCardPanel.lambda$createConfigurableComponent$0(ConfigurableCardPanel.java:74)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:821)
at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:71)
at com.intellij.openapi.options.ex.ConfigurableCardPanel.createConfigurableComponent(ConfigurableCardPanel.java:70)
at com.intellij.openapi.options.ex.ConfigurableCardPanel.create(ConfigurableCardPanel.java:56)
at com.intellij.openapi.options.newEditor.ConfigurableEditor$1.create(ConfigurableEditor.java:56)
at com.intellij.openapi.options.newEditor.ConfigurableEditor$1.create(ConfigurableEditor.java:53)
at com.intellij.ui.CardLayoutPanel.createValue(CardLayoutPanel.java:87)
at com.intellij.ui.CardLayoutPanel.select(CardLayoutPanel.java:115)
at com.intellij.ui.CardLayoutPanel.lambda$null$0(CardLayoutPanel.java:131)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:309)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:441)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:424)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:407)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:908)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:781)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:424)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:687)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:117)
at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
at java.desktop/java.awt.Dialog.show(Dialog.java:1063)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:708)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:433)
at com.intellij.openapi.ui.DialogWrapper.doShow(DialogWrapper.java:1698)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1657)
at com.intellij.openapi.options.newEditor.SettingsDialog.lambda$show$0(SettingsDialog.java:86)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:83)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:149)
at com.intellij.openapi.options.newEditor.SettingsDialog.show(SettingsDialog.java:86)
at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.java:84)
at com.intellij.ide.actions.ShowSettingsAction.perform(ShowSettingsAction.java:54)
at com.intellij.ide.actions.ShowSettingsAction.actionPerformed(ShowSettingsAction.java:41)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:298)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:315)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:604)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$processAction$3(IdeKeyEventDispatcher.java:657)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:193)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:656)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:517)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:472)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:221)
at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:830)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:775)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:424)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:698)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

IDE Fatal Error. IDEA 13.1.1. Plugin version 1.3. OS X 10.9.2

null
java.lang.NullPointerException
at com.github.kumaraman21.intellijbehave.resolver.StepDefinitionIterator.processFile(StepDefinitionIterator.java:54)
at com.intellij.openapi.vfs.VfsUtilCore$1.visitFileEx(VfsUtilCore.java:228)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:243)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:275)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:275)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:275)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:275)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:275)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:275)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:275)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:275)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:275)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:275)
at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:275)
at com.intellij.openapi.vfs.VfsUtilCore.iterateChildrenRecursively(VfsUtilCore.java:223)
at com.intellij.openapi.roots.impl.ModuleFileIndexImpl.iterateContent(ModuleFileIndexImpl.java:56)
at com.github.kumaraman21.intellijbehave.utility.ScanUtils.iterateInContextOf(ScanUtils.java:31)
at com.github.kumaraman21.intellijbehave.resolver.StepPsiReference.stepDefinitionAnnotation(StepPsiReference.java:59)
at com.github.kumaraman21.intellijbehave.resolver.StepPsiReference.resolve(StepPsiReference.java:66)
at com.intellij.codeInsight.TargetElementUtilBase.getReferenceOrReferencedElement(TargetElementUtilBase.java:314)
at com.intellij.codeInsight.TargetElementUtil.getReferenceOrReferencedElement(TargetElementUtil.java:95)
at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:200)
at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:60)
at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:92)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:61)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:380)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1153)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:371)
at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:368)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:344)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask.exec(JobLauncherImpl.java:193)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:109)

Can we have this plugin support specs implemented in Scala?

We have recently started using Scala to write Jbehave Specs and the tests all run fine. But since the plugin only allows jumping to Step definition from .story file to either Java or Groovy file the ones that have been defined in Scala code are not recognized. I was wondering how difficult would it to be add Scala support as well?

Structure View does not support Lifecycle steps

Applies to plugin v1.57

My story has Lifecycle steps but I do not see them appear in the Structure View

image

I would expect if a story has Lifecycle steps, they would show up in the Structure View accordingly to their Scope.

ex:
Lifecycle:
Before:
Scope: STORY
[steps to be executed before each story]
Scope: SCENARIO
[steps to be executed before each scenario]
Scope: STEP
[steps to be executed before each scenario step]
After:
Scope: STEP
[steps to be executed after each scenario step]
Scope: SCENARIO
[steps to be executed after each scenario]
Scope: STORY
[steps to be executed after each story]

Should display in Structure tree view as:

filename
 V Story
  V Before Story Steps
  V Scenario1
   V Before Scenario Steps
   V Before Each Scenario Step Steps
   Scenario1 Step1
   V After Each Scenario Step Steps
   ...
   V After Scenario Steps
  V Scenario2
   V Before Scenario Steps
   V Before Each Scenario Step Steps
   Scenario1 Step2
   V After Each Scenario Step Steps
   ...
   V After Scenario Steps
  V After Story Steps
  V Examples:

ClassNotFoundException: JBehaveTemplateLoaderComponent

Using this plugin in IntelliJ IDEA Ultimate 2021.2 Beta shows me the following error message:

Plugin 'jbehave-support-plugin' failed to initialize and will be disabled. Please restart IntelliJ IDEA.

java.lang.ClassNotFoundException: com.github.kumaraman21.intellijbehave.template.JBehaveTemplateLoaderComponent
             PluginClassLoader(plugin=PluginDescriptor(name=JBehave Support, id=jbehave-support-plugin, descriptorPath=plugin.xml, path=~/.local/share/JetBrains/IntelliJIdea2021.2/JBehave Support, version=1.53, package=null), packagePrefix=null, instanceId=91, state=active)

Any idea how to fix this?

Cannot create configurable

For a while now I cannot use the plugin in the latest IntelliJ version

IntelliJ IDEA 2021.3 (Ultimate Edition)
Build #IU-213.5744.223, built on November 27, 2021

Together with JDK 11:

openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)

Windows 10 Pro.

The error I am shown is:

Cannot create configurable

com.intellij.diagnostic.PluginException: com.github.kumaraman21.intellijbehave.settings.JBehaveConfigurable PluginClassLoader(plugin=PluginDescriptor(name=JBehave Support, id=jbehave-support-plugin, descriptorPath=plugin.xml, path=~\AppData\Roaming\JetBrains\IntelliJIdea2021.3\plugins\IntelliJBehave.jar, version=1.54, package=null, isBundled=false), packagePrefix=null, instanceId=318, state=active)
	at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClass(ComponentManagerImpl.kt:894)
	at com.intellij.openapi.options.ConfigurableEP$ClassProducer.createElement(ConfigurableEP.java:440)
	at com.intellij.openapi.options.ConfigurableEP.createConfigurable(ConfigurableEP.java:346)
	at com.intellij.openapi.options.ex.ConfigurableWrapper.createConfigurable(ConfigurableWrapper.java:43)
	at com.intellij.openapi.options.ex.ConfigurableWrapper.getConfigurable(ConfigurableWrapper.java:119)
	at com.intellij.openapi.options.ex.ConfigurableWrapper.cast(ConfigurableWrapper.java:92)
	at com.intellij.openapi.options.ex.ConfigurableWrapper.getId(ConfigurableWrapper.java:218)
	at com.intellij.openapi.options.ex.ConfigurableExtensionPointUtil.groupConfigurables(ConfigurableExtensionPointUtil.java:272)
	at com.intellij.openapi.options.ex.ConfigurableExtensionPointUtil.getConfigurableGroup(ConfigurableExtensionPointUtil.java:134)
	at com.intellij.openapi.options.ex.ConfigurableExtensionPointUtil.lambda$getConfigurableGroup$1(ConfigurableExtensionPointUtil.java:123)
	at com.intellij.openapi.util.ClearableLazyValue$2.compute(ClearableLazyValue.java:26)
	at com.intellij.openapi.util.ClearableLazyValue.getValue(ClearableLazyValue.java:39)
	at com.intellij.openapi.util.AtomicClearableLazyValue.getValue(AtomicClearableLazyValue.java:9)
	at com.intellij.openapi.options.ex.EpBasedConfigurableGroup$createListener$1.run(EpBasedConfigurableGroup.kt:97)
	at com.intellij.openapi.extensions.impl.ExtensionPointImpl$4.extensionListChanged(ExtensionPointImpl.java:837)
	at com.intellij.openapi.extensions.impl.ExtensionPointImpl.notifyListeners(ExtensionPointImpl.java:745)
	at com.intellij.openapi.extensions.impl.ExtensionPointImpl.lambda$registerExtensions$17(ExtensionPointImpl.java:971)
	at com.intellij.ide.plugins.DynamicPlugins$loadPlugin$2.run(DynamicPlugins.kt:840)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:947)
	at com.intellij.ide.plugins.DynamicPlugins.loadPlugin(DynamicPlugins.kt:828)
	at com.intellij.ide.plugins.DynamicPlugins.access$loadPlugin(DynamicPlugins.kt:100)
	at com.intellij.ide.plugins.DynamicPlugins$loadPlugins$1.invoke(DynamicPlugins.kt:118)
	at com.intellij.ide.plugins.DynamicPlugins$loadPlugins$1.invoke(DynamicPlugins.kt:100)
	at com.intellij.ide.plugins.DynamicPlugins.updateDescriptorsWithoutRestart(DynamicPlugins.kt:171)
	at com.intellij.ide.plugins.DynamicPlugins.loadPlugins(DynamicPlugins.kt:117)
	at com.intellij.ide.plugins.DynamicPluginEnabler.updatePluginsState(DynamicPluginEnabler.kt:158)
	at com.intellij.ide.plugins.newui.MyPluginModel.applyEnableDisablePlugins(MyPluginModel.java:241)
	at com.intellij.ide.plugins.newui.MyPluginModel.apply(MyPluginModel.java:181)
	at com.intellij.ide.plugins.PluginManagerConfigurable.apply(PluginManagerConfigurable.java:1670)
	at com.intellij.openapi.options.ex.ConfigurableWrapper.apply(ConfigurableWrapper.java:182)
	at com.intellij.openapi.options.newEditor.ConfigurableEditor.apply(ConfigurableEditor.java:324)
	at com.intellij.openapi.options.newEditor.SettingsEditor$5.apply(SettingsEditor.java:207)
	at com.intellij.openapi.options.newEditor.ConfigurableEditor$2.actionPerformed(ConfigurableEditor.java:65)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:270)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6654)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
	at java.desktop/java.awt.Component.processEvent(Component.java:6419)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5029)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2790)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:891)
	at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:820)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:757)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:498)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:117)
	at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
	at java.desktop/java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.desktop/java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
	at java.desktop/java.awt.Dialog.show(Dialog.java:1070)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:701)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:437)
	at com.intellij.openapi.ui.DialogWrapper.doShow(DialogWrapper.java:1671)
	at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1629)
	at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.java:90)
	at com.intellij.ide.actions.ShowSettingsAction.perform(ShowSettingsAction.java:50)
	at com.intellij.ide.actions.ShowSettingsAction.actionPerformed(ShowSettingsAction.java:37)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAwareWithCallbacks$4(ActionUtil.java:244)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:265)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:244)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:300)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:236)
	at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:67)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:292)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$3(ActionMenuItem.java:131)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:131)
	at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:541)
	at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:571)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6654)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
	at java.desktop/java.awt.Component.processEvent(Component.java:6419)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5029)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2790)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:891)
	at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:820)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:757)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:498)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.ClassNotFoundException: com.github.kumaraman21.intellijbehave.settings.JBehaveConfigurable PluginClassLoader(plugin=PluginDescriptor(name=JBehave Support, id=jbehave-support-plugin, descriptorPath=plugin.xml, path=~\AppData\Roaming\JetBrains\IntelliJIdea2021.3\plugins\IntelliJBehave.jar, version=1.54, package=null, isBundled=false), packagePrefix=null, instanceId=318, state=active)
	at com.intellij.serviceContainer.ComponentManagerImplKt.doLoadClass(ComponentManagerImpl.kt:1443)
	at com.intellij.serviceContainer.ComponentManagerImplKt.access$doLoadClass(ComponentManagerImpl.kt:1)
	at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClass(ComponentManagerImpl.kt:886)
	... 136 more

Is it possible to provide enum options as part of step completion?

Hi

We've been using this plugin for a little while now and found it vastly superior to both earlier plugins for jbehave on intellij and also eclipse.

However I was wondering firstly whether the following improvement is technically possible and if so the secondly whether it would be implemented?

We generally write a steps in the following way:

@when("Toolbar bold button is clicked")
@then("Toolbar bold button is enabled")
@then("Toolbar bold button is visible")

However for a toolbar that has say 30 buttons on it this means replicating these three steps 30 times over which results in 90 steps. This is not great for code duplication.

So we currently use the approach of:

@when("Toolbar $buttonname button is clicked")
@then("Toolbar $buttonname button is enabled")
@then("Toolbar $buttonname button is visible")

and then use a map (if we're passing button name as a string) or an switch statement (if we are passing an enum) in a page object method to carry out a common method on whichever button locator has been specified.

However this makes story writing somewhat harder as when those steps are used the author of the story needs to know what string or enum value to set and thus usually has to inspect the code to find what they need.

What would be ideal would be the ability to provide in the plugin during step completion a list of parameter options (e..g. Bold, Italic, Underline) that a story author can select for this step.

Is this feasible? Would it require changes to JBehave itself or merely the plugin if so?

many thanks

Ben

JBehave support plugin doesn't work with IntelliJ 13.1.1

When starting, you get this error. It seems like a problem with jdk versions?

Plugin 'jbehave-support-plugin' failed to initialize and will be disabled. Please restart IntelliJ IDEA.

com.intellij.diagnostic.PluginException: com/github/kumaraman21/intellijbehave/template/JBehaveTemplateLoaderComponent : Unsupported major.minor version 51.0 [Plugin: jbehave-support-plugin]
at com.intellij.ide.plugins.cl.PluginClassLoader.b(PluginClassLoader.java:130)
at com.intellij.ide.plugins.cl.PluginClassLoader.a(PluginClassLoader.java:77)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:66)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:408)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:398)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.access$000(ComponentManagerImpl.java:384)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:107)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:89)
at com.intellij.openapi.components.impl.stores.ApplicationStoreImpl.load(ApplicationStoreImpl.java:87)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:508)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:150)
at com.intellij.idea.MainImpl$1$1$1.run(MainImpl.java:59)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.UnsupportedClassVersionError: com/github/kumaraman21/intellijbehave/template/JBehaveTemplateLoaderComponent : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.lang.ClassLoader.defineClass(ClassLoader.java:471)
at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:189)
at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:185)
at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:161)
at com.intellij.ide.plugins.cl.PluginClassLoader.b(PluginClassLoader.java:124)
... 31 more

plugin cannot recognize long steps separated on several lines in class with steps

  1. Create a step separated on a few lines, e.g.
    image

    @given("I go to the page $page to validate " +
    "name $name " +
    "email $email " +
    "department $department")
    public void test(String name, String email, String department) {
    // test something
    }

  2. Go to the story file and try to use this step:
    image

  3. Try to add it via the autosuggestion
    image

ACTUAL RESULT
From screenshot you can see that plugin recognizes step incorrectly

EXPECTED RESULT:
Step must be recognized as:
Given I go to the page $page to validate name $name email $email department $department

Composite Steps not being found

JBehave has a feature called Composite Steps. I tried to use it but my IntelliJ Idea plugin shows my composite steps as not found.
See the screenshot:

2016-02-22 12-06-29 login story - webtests - ideaprojects webtests

Here is the code (3 steps in the beginning are part of one composite step):

login.story

Scenario: Should be able to successfully register on website
Meta:
@scenario Registration
Given I am new to the website
Given I want to register for a user account
When I go to the registration form
And I complete all the required registration details correctly
Then I will be registered on the website
And I will be automatically logged in

LoginJbSteps.java

@Given("I am at the registration page")
    @Composite(steps = {"Given I am new to the website",
            "Given I want to register for a user account",
            "When I go to the registration form"})
    @net.thucydides.core.annotations.Pending
    public void goToRegistrationPage() {
        loginSrnSteps.openRegistrationPage();
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.