Community
Participate
Working Groups
M20050831-1200 Smart indentation on return always indents to column after square brakets: public class Test { private void helper2(boolean[] booleans) { if (booleans[0]) { } } } With default Eclipse code formatter settings, set the caret to after one of the "]" and press Enter. Expected: the new line is indented by 2 more tabs than the line above Was: new line is indented on column (with spaces)
*** This bug has been marked as a duplicate of 65317 ***
This is not fixed with the fix for bug 65317.
Created attachment 182683 [details] Fix
Comment on attachment 182683 [details] Fix The patch does not work for me: it still adds spaces instead of tabs. Also, please make sure that pressing 'Enter' before the ']' also works.
Forgot this: please also add a test case.
Created attachment 184095 [details] Patch Handles continuation after ']' and '['. Also attached tests.
Comment on attachment 184095 [details] Patch This patch still does not work. Please read comment 4 again.
(In reply to comment #7) > (From update of attachment 184095 [details] [diff]) > This patch still does not work. Please read comment 4 again. One can argue that inserting spaces to align the closing square bracket is a feature, so lets leave that for now. What's still not working is that Ctrl+I changes the indentation again.
> What's still not working is that Ctrl+I changes the indentation again. That's a separate issue covered by bug 330556. Committed the patch but with fixed indentation (the case statement was indented to far). Available in builds >= N20101201-2000.
All recently made indent fixes had to be reverted due to several regressions (bug 331028, bug 330556 and bug 331734).
Committed Rajesh's modified patch (patch will be attached soon).
Created attachment 187944 [details] Patch