Community
Participate
Working Groups
BETA_JAVA7 For arguments in a mutli-catch statement, we currently always wrap after the '|' operator i.e. catch ( ExceptionA | ExceptionB | Exception C) It will be good to have an option to allow wrapping before '|' i.e. catch ( ExceptionA | ExceptionB | Exception C) This is on the lines of a similar "wrap before operator" option for Binary Expression's Line wrapping options.
Good point. Please also change the default to wrap *before* the operator, so as to match http://www.oracle.com/technetwork/java/codeconventions-136091.html#248 .
Created attachment 199045 [details] proposed fix v1.0 + regression tests Adds the new option org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_OR_OPERATOR_MULTICATCH and set the default to true. So now wrapping is always 'before' the '|' operator. Adjusted tests to reflect this.
Olivier, can you please review? Thanks!
Ping!
Patch looks good. Ayushman, please release.
Released in BETA_JAVA7 branch
Verified with v20110714-1300.