Reputation: 3817
I am using Intellij cucumber-java plugin. After updating to cucumber-jvm 3, it fails to navigate to step definitions from feature files since I am using new argument placeholders now (e.g., "I have {int} cukes in my {string}"
instead of "^I have (\d+) cukes in my (.*?)$"
).
I would like to tweak cucumber-java plugin but I don't really get it how to build and run intellij's plugin locally. I cloned the plugins from https://github.com/JetBrains/intellij-plugins, cloned intellij community edition and set up plugin devKit. At this point I don't see how to build and run cucumber-java plugin locally. I tried to create a new plugin to extend cucumber-java but there is no extension points in cucumber-java.
Is it dead-end or am I missing something really obvious?
Upvotes: 1
Views: 620
Reputation: 81
I know it is old question, but mby someone will find this answer usefull.
Not long ago I actually managed to tweak the cucumber plugin (gherkin) for intelliJ, so mby same way will work for cucumber-java plugin.
I had a problem with very complex step definitions, when I used many optional regexps. eg. If I had something like this in my stepdef "(| using user \"([^\"])\" and password \"([^\"])\")" then autocompletion was failing and showed just param for the rest of the step, but nvm why I needed to "repair" the plugin - this is what I've done to make it work for me:
I converted the plugin from devkit way to gradle based plugin, this article was very usefull for me: adding-gradle-support-to-an-existing-devkit-based-intellij-platform-plugin
I got rid of all compilation issues, I had to change one class from kotlin to java, and fix some issues with properties.
After that I was able to build the plugin and simply install compiled jar by hand in intelliJ, what I have never achived is to debug the plugin.
Upvotes: 1
Reputation: 3817
Whoever is looking for an answer: cucumber-java plugin doesn't have extension points. The solution is not to use cucumber expression but stick to regex. Regex are still working for cucumber 3.
Upvotes: 0