Community
Participate
Working Groups
I20081202-1812. The FORMATTER_PRESERVE_EXISTING_LINE_BREAKS option says: Option to specify whether the formatter should preserve existing line breaks or not This is too generic. It should tell more precisely what it does i.e. in which cases it applies.
I think this one should go into 3.5M4 as well, otherwise we would need to deprecate it if we decided to change the name (as I'm intending to do....)
So, instead of the too generic one, here's the new constant proposal: /** * <pre> * FORMATTER / Option to specify whether the formatter should preserve existing wrapping line breaks or not * * For example, the wrapped lines of method foo return statement in following test case: * class X { * String foo() { * return "select x " * + "from y " * + "where z=a"; * } * } * * will be preserved by the formatter when the new preference is used, * hence produces the following output: * class X { * String foo() { * return "select x " * + "from y " * + "where z=a"; * } * } * * - option id: "org.eclipse.jdt.core.formatter.preserve_existing_wrapping_line_breaks" * - possible values: { TRUE, FALSE } * - default: FALSE * </pre> * @since 3.5 */ public static final String FORMATTER_PRESERVE_EXISTING_WRAPPING_LINE_BREAKS = JavaCore.PLUGIN_ID + ".formatter.preserve_existing_wrapping_line_breaks"; //$NON-NLS-1$
I think the name should be consistent with what's proposed in bug 257906. So what about "FORMATTER_JOIN_WRAPPED_LINES" with a default set to TRUE ?
Patch of bug 257906 was released for 3.5M4 in HEAD stream which fixes this bug as well.
Verified for 3.5M4 using I20081209-0100