source code formatting - code on one line

Does anyone know how to keep the source code formatter from wrapping my one-line statements to two? I've tried a few different settings in the Work In Progress section, and when I have code like this:

catch ( Exception ex ) { throw new RuntimeException(ex); }

the formatter wraps it to

catch ( Exception ex )
{ throw new RuntimeException(ex); }

I find keeping everything on one line to be useful for noisy exceptions I'm required to catch and mundane things like getters, setters, simple constructors, etc.

If it isn't possible to stop this wrapping behavior, I'll put in a feature request.

Regards, Steve

2 comments
Comment actions Permalink

Code Style->General->(Keep when reformating)Control Statement in one line

Does anyone know how to keep the source code formatter from wrapping my one-line statements to two? I've tried a few different settings in the Work In Progress section, and when I have code like this:

catch ( Exception ex ) { throw new RuntimeException(ex); }

the formatter wraps it to

catch ( Exception ex )
{ throw new RuntimeException(ex); }

I find keeping everything on one line to be useful for noisy exceptions I'm required to catch and mundane things like getters, setters, simple constructors, etc.

If it isn't possible to stop this wrapping behavior, I'll put in a feature request.

Regards, Steve



--
Dmitry Skavish
-


Boston, MA, USA
tel. +1 781 370-6909
http://www.jzox.com
http://www.flashgap.com

1
Comment actions Permalink

Seems like it should work. I noticed that too and have always had it checked, I think something from Work In Progress must be overriding that setting.

0

Please sign in to leave a comment.