| Summary: | [1.7][formatter] New option to wrap before/after '|' in multi-catch | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Ayushman Jain <amj87.iitr> | ||||
| Component: | Core | Assignee: | Ayushman Jain <amj87.iitr> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | deepakazad, markus.kell.r, Olivier_Thomann | ||||
| Version: | 3.7 | Flags: | Olivier_Thomann:
review+
|
||||
| Target Milestone: | 3.7.1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 351081 | ||||||
| Attachments: |
|
||||||
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. |
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.