Community
Participate
Working Groups
Formatter has been updated for try with resources (see Bug 349008). Now Ctrl+I and Enter behave differently from the formatter and need to be updated. ------------------------------------------------------------------------ try (FileReader reader1 = new FileReader("file1"); FileReader reader2 = new FileReader("file2"); FileReader reader3 = new FileReader("file3"); FileReader reader4 = new FileReader("file4"); FileReader reader5 = new FileReader("file5")) { int ch; while ((ch = reader1.read()) != -1) { System.out.println(ch); } } ------------------------------------------------------------------------
3.7.1 time permitting.
"FileReader reader2 = new FileReader("file2");" and subsequent resource declarations are indented by 2 with respect to 'try' by the formatter, however Ctrl+I does not indent them at all.
Created attachment 198169 [details] fix + test
Dnai, the fix looks ok?
The patch looks good. Please merge it with the patch from bug 348198 (this is also intended to go into 3.7.1 anyway) and commit both together into the beta branch. Thanks.
Thanks for the review Dani! Committed to BETA_JAVA7.
Verified using JDT feature patch v20110714-1300.