Bug 128205 - Add a threshold value for when to apply line wrapping rules in formatting
Summary: Add a threshold value for when to apply line wrapping rules in formatting
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-16 09:44 EST by Jeff Myers CLA
Modified: 2006-02-16 10:43 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Myers CLA 2006-02-16 09:44:25 EST
The Line Wrapping rules for formatting Java code are already quite flexible, but I'd really like it if there was a threshold value that's used to determine the number of items necessary for the customized rules are applied, or whether the default line wrapping would be in effect. For example, if the threshold value was 4, and the Method Declaration -> Parameters option was set to "Wrap all elements except the first element if not necessary"... the formatter would format the following:

public void foo(int a, int b, int c);
public void bar(int a,
                int b,
                int c,
                int d);

because foo has three parameters, thus under the threshold value, whereas bar has four parameters - and the formatting rule is applied.

The threshold value could either be universal across all of the Line Wrapping settings (with 4 or 5 seeming to be a good default where all of the circumstances where formatting rules settings become necessary), or it could be a value tied to each individual formatting setting.