Community
Participate
Working Groups
Created attachment 87835 [details] [patch] - proposed fix Version: 3.4.0 Build id: I20080122-1600 jdt.ui side of bug 122247. Please be aware that fix for bug is about to be integrated into HEAD stream. New formatting preference (DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ARG_ANNOTATION) is to be added and should be picked-up in the Code Formatter pref page (new line tab). Attached is a contributed proposal patch in order to add the new pref.
fix for bug 122247 released in HEAD
Benno, please take care of this.
Eric, I don't understand, what are the expected results? Here is what I get Given: @Deprecated public void bar(@SuppressWarnings("unused") int i) { } 1. New line after annotation= true New line after parameter annotation= true Is: @Deprecated public void bar(@SuppressWarnings("unused") int i) { } Expected: as expected 2. New line after annotation= true New line after parameter annotation= false Is: @Deprecated public void bar(@SuppressWarnings("unused") int i) { } Expected: ? 3. New line after annotation= false New line after parameter annotation= true Is: @Deprecated public void bar(@SuppressWarnings("unused") int i) { } Expected: ? 4. New line after annotation= false New line after parameter annotation= false Is: @Deprecated public void bar(@SuppressWarnings("unused") int i) { } Expected: as expected
(In reply to comment #3) > 2. > New line after annotation= true > New line after parameter annotation= false > Is: > @Deprecated > public void bar(@SuppressWarnings("unused") > int i) { > } > Expected: public class X { @Deprecated public void bar(@SuppressWarnings("unused") int i) { } } > 3. > New line after annotation= false > New line after parameter annotation= true > Is: > @Deprecated public void bar(@SuppressWarnings("unused") int i) { > } > Expected: public class X { @Deprecated public void bar(@SuppressWarnings("unused") int i) { } }
(In reply to comment #3) Benno, as per expected behavior for settings 2 and 3, fix for bug 122247 will be modified this morning. I'll let you know when done. Thanks for pointing out these gaps.
(In reply to comment #5) Benno: new code for bug 122247 uploaded to HEAD. New constant is now: FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_PARAMETER
Created attachment 88743 [details] fix
fixed > I20080129-1400