Summary: | [formatter] Java Formatter does not wrap long enum constant declarations | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | David Balažic <david.balazic> |
Component: | Core | Assignee: | Ayushman Jain <amj87.iitr> |
Status: | VERIFIED WORKSFORME | QA Contact: | |
Severity: | minor | ||
Priority: | P3 | CC: | amj87.iitr, Olivier_Thomann |
Version: | 3.6.1 | ||
Target Milestone: | 3.7 M6 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
David Balažic
2011-02-11 04:31:18 EST
Note: the above example should be having 3 lines: 1: public enum Foo { 2: the values listed 3: } Line wrapping in enum declarations can be achieved by the Line wrapping tab in Formatter preferences> select 'enum declarations', and at the bottom in "Line wrapping policy" drop down menu, chose 'Wrap where necessary'. Note that both inbuilt formatter settings you used dont have this on by default. So you'll have to create a new formatter profile and switch it on. Closing as WORKSFORME Sorry, the question is : why is the default set like it is. What is the reasoning? Why are for example array initializers wrapped, but enums not? The default settings won't change. They might not have been well defined initially, but changing them would cause changes to formatted code for users that are using the default settings. What you want can be achieved by changing the default formatter profile. Closing as WORKSFORME. Verified for 3.7M6. |