Is formatting of JBehave tables possible?
Hi,
I'd like to extend one of the JBehave plugins to be able to format tables, would this be possible in an IntelliJ IDEA plugin?
An example would be starting with a table like
|header1|header2|header123|
|value|other longer value|yet another value|
|foo|bar|blah|
Would re-format to the following
|header1|header2 |header123 |
|value |other longer value|yet another value|
|foo |bar |blah |
I realise this structure isn't the traditional tree like/block structure that the code formatter is used to.
Before I attempt this does anyone have any thoughts on whether it is even possible?
Thanks,
Jon
Please sign in to leave a comment.
String Manipulation plugin has such thing implemented:
Do you want to do it manually or intergrate such thing with the code formatter, so it is done automatically?
The Cucumber plugin supports formatting tables in a similar way. https://github.com/JetBrains/intellij-plugins/blob/master/cucumber/src/org/jetbrains/plugins/cucumber/psi/formatter/GherkinBlock.java
Thanks both, I think I'm going to start with the text plugin for now and try and extend JBehave plugin based on the Cucumber Gherkin support.
I realise also that my focus is on the JBehave table parameters (embedded within given-when-then) for the moment rather than the Gherkin style 'Examples' table (following given-when-then).
Jon