Is formatting of JBehave tables possible?


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

|value|other longer value|yet another value|

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?


Comment actions Permalink

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?

Comment actions Permalink

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).



Please sign in to leave a comment.