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

3 comments
Comment actions Permalink

String Manipulation plugin has such thing implemented:

http://plugins.jetbrains.com/files/2162/screenshot_15074.png


Do you want to do it manually or intergrate such thing with the code formatter, so it is done automatically?

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

Jon

0

Please sign in to leave a comment.