Community
Participate
Working Groups
20041104 I think it might make sense to be able to set the allignment of enum constants as you might define them all on a line enum MyColors { BLUE, RED, GREEN, YELLOW, BLACK }
Do you need this for 3.1?
I can add this new API and do it after M6. /** * <pre> * FORMATTER / Option for alignment of enum constants * - option id: "org.eclipse.jdt.core.formatter.alignment_for_enum_constants" * - possible values: values returned by <code>createAlignmentValue(boolean, int, int)</code> call * - default: createAlignmentValue(false, WRAP_COMPACT, INDENT_DEFAULT) * </pre> * @see #createAlignmentValue(boolean, int, int) * @since 3.1 */ public static final String FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ENUM_CONSTANT = JavaCore.PLUGIN_ID + ".formatter.alignment_for_enum_constants"; //$NON-NLS-1$
Default should be no wrapping. I will add the API for M6 and implement it for M7.
ok, great
Fixed and released in HEAD. Regression tests added in FormatterRegressionTests.test570/571. Martin, could you please add this option to the code formatter preference page?
UI added > 20050405
Verified for 3.1 M7 using build I20050512-2035 + jdt.core HEAD.