Discussion:
[Cucumber] [Cucumber-JVM] [Gherkin] IntelliJ support fails after update from cucumber 1.2.5 to 2.0.0-SNAPSHOT
(too old to reply)
m***@mdsol.com
2017-07-20 17:14:42 UTC
Permalink
Raw Message
Hi,

Running any scenario with IntelliJ support (right-click and run) fails
after updating to cucumber 2.0.0-SNAPSHOT with the following error:
Caused by: java.lang.ClassNotFoundException: gherkin.formatter.Formatter

This is because IntelliJ relies on the CucumberJvmSMFormatter
<https://github.com/JetBrains/intellij-community/blob/master/plugins/cucumber-jvm-formatter/src/org/jetbrains/plugins/cucumber/java/run/CucumberJvmSMFormatter.java> which
extends the Formatter.

Why the Formatter class is no longer available? Would it be possible to
deprecate it instead of removing?

Many thanks,
Maciej
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
MP Korstanje
2017-07-23 10:07:29 UTC
Permalink
Raw Message
Unfortunately not.

With the removal of the formatter also came a change in the protocol.
Gherkin v4 uses an event based protocol rather then an AST based protocol.
It'd be quite hard to retrofit any formatter.

Can IntelliJ detect which version of Cucumber is being used and serve up a
different formatter?
Post by m***@mdsol.com
Hi,
Running any scenario with IntelliJ support (right-click and run) fails
Caused by: java.lang.ClassNotFoundException: gherkin.formatter.Formatter
This is because IntelliJ relies on the CucumberJvmSMFormatter
<https://github.com/JetBrains/intellij-community/blob/master/plugins/cucumber-jvm-formatter/src/org/jetbrains/plugins/cucumber/java/run/CucumberJvmSMFormatter.java> which
extends the Formatter.
Why the Formatter class is no longer available? Would it be possible to
deprecate it instead of removing?
Many thanks,
Maciej
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
MP Korstanje
2017-07-23 10:38:59 UTC
Permalink
Raw Message
Yes. The configuration is generated by the
CucumberJavaRunConfigurationProducer
<https://github.com/JetBrains/intellij-plugins/blob/master/cucumber-java/src/org/jetbrains/plugins/cucumber/java/run/CucumberJavaRunConfigurationProducer.java>
in the Intellij-Plugins repo.

I reckon you'd be best of submitting PR's against both repo's. You can look
at the JSONFormatter
<https://github.com/cucumber/cucumber-jvm/blob/master/core/src/main/java/cucumber/runtime/formatter/JSONFormatter.java>
and JUnitFormatter
<https://github.com/cucumber/cucumber-jvm/blob/master/core/src/main/java/cucumber/runtime/formatter/JUnitFormatter.java>
to see how the event protocol works.

Please let me know if you need any help!

Best,
MP
Post by MP Korstanje
Unfortunately not.
With the removal of the formatter also came a change in the protocol.
Gherkin v4 uses an event based protocol rather then an AST based protocol.
It'd be quite hard to retrofit any formatter.
Can IntelliJ detect which version of Cucumber is being used and serve up
a different formatter?
Post by m***@mdsol.com
Hi,
Running any scenario with IntelliJ support (right-click and run) fails
Caused by: java.lang.ClassNotFoundException: gherkin.formatter.Formatter
This is because IntelliJ relies on the CucumberJvmSMFormatter
<https://github.com/JetBrains/intellij-community/blob/master/plugins/cucumber-jvm-formatter/src/org/jetbrains/plugins/cucumber/java/run/CucumberJvmSMFormatter.java> which
extends the Formatter.
Why the Formatter class is no longer available? Would it be possible to
deprecate it instead of removing?
Many thanks,
Maciej
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...