Community
Participate
Working Groups
I want my code to look like this: if (foo) { bar(); } Note that braces are not only on their own lines, but indented to line up with the code they contain. The code formatter preferences don't offer this option.
We need to clear 2.1 bug reports that won't be addressed before 2.1. The new implementation is still in the works. Therefore we cannot include it for 2.1. Not enough testing and we need to polish the preferences. This will be address for 2.2 as stated in the JDT/Core plan.
Resurrecting for 3.0
Reopen for 3.0 consideration.
This is addressed in the new formatter. Fixed and released in HEAD. Regression test added.
Verified.
I have looked and looked in the code formatter but cannot find this feature? if (foo) { bar(); } I want the braces indented to line up with the code they contain?
Could you please provide your formatter preferences? Attach them to this bug report.
This has been working for me since 2.1. Check the 'Braces' tab and set the drop downs to 'Next line indented'. What doesn't seem to work for me is the the following: obj.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent arg0) { // TODO Auto-generated method stub } }); When it should be: obj.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent arg0) { // TODO Auto-generated method stub } });
Created attachment 15029 [details] Code formatter settings under 3.1M2 Code formatter settings to reproduce formatting in previous post
Deferring post 3.1
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.