| Summary: | add feature to insert braces for simple if statements | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Mark Drew <eclipse> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | daniel_megert, rhauser |
| Version: | 3.1 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
Formatting only touches white spacing. There's a Quick Assist (Change then statement to block). Martin: - what about the while? - I found it strange that I didn't get that Quick Assist while caret is in the statement - the same quick assist exists for while (and for and do) - Quick assists inside the sytatement would mix with other assist and make the list too long. This enhancement request is not about quick assists, it's about the Java code formatter. Quick assists are fine for some things, but for formatting/transforming large sections of code, they are not practical. It doesn't matter to me if this feature is added to the code formatter, or elsewhere, but quick assists are not--IMHO--a satisfactory solution. Maybe this feature could be added in a way that is similar to the organize imports feature. (Would it help if I filed a new enhancement request along these lines?) Please reconsider, or consider some other feature to allow bulk changes. Thanks! Sorry if I'm making a pest of myself, but could this feature be added in a way that is similar to the organize imports feature? (Would it help if I filed a new enhancement request along these lines?) Please see comment 5. Yes that could be done, but is currently not planed. Help is definitly welcome. |
[formatting] add option to insert braces for simple if statements (and other appropriate control statements) For example, it would be great if there was an option in the formatter that would format code that looks like this while (someTest) someTest = ...; if (test) return x; else return y; into this while (someTest) { someTest = ...; } if (test) { return x; } else { return y; }