| Summary: | [1.7][preferences][formatting] Line wrapping and indentation options for try with resources and multi-catch arguments | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> | ||||
| Component: | UI | Assignee: | Deepak Azad <deepakazad> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | amj87.iitr, deepakazad, jarthana, markus.kell.r, satyam.kandula | ||||
| Version: | 3.7 | Flags: | markus.kell.r:
review+
|
||||
| Target Milestone: | 3.7.1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 349396, 350697 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
|
Description
Markus Keller
Deepak, can you please have a look? In the preview, please add 2 resources to the existing try statement. Multi catch: UI for the new options from bug 349314. *** Bug 350521 has been marked as a duplicate of this bug. *** Created attachment 198806 [details]
fix
The preview on 'Line Wrapping' page is not coming correctly, I am not sure why. Markus can you please take a look.
- The same snippet for try with resources is formatted correctly on 'While space' page which uses SnippetPreview whereas 'Line wrapping' page uses CompilationUnitPreview - JavaPreview.JavaPreview(Map<String, String>, Composite) has references to JavaCore.VERSION_1_5. I changed these to JavaCore.VERSION_1_7 but this did not change anything. Fix looks good with these corrections in WhiteSpaceOptions: - createTryStatementTree(Map<String, String>, InnerNode): FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_TRY should be at the end (options are sorted in declaration order) - formatting of TRY_PREVIEW could be aligned with all the other snippets Fix for bug 350697 resolved the problems with the preview formatting. Committed to BETA_JAVA7 with the changes from comment 6. Verified. |