Summary: | [formatting] Continuation indent support | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Brian Pontarelli <brian> |
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
Status: | RESOLVED WONTFIX | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | david.jackman, eclipse, gabriele.garuglieri |
Version: | 2.1 | ||
Target Milestone: | 3.3 RC4 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Brian Pontarelli
2003-01-03 16:22:55 EST
I'm not certain if this PR is tracking the new 'Code Formatter' configuration page in the JDT preferences. But here is some feed back that I have. I have the 200404220800 build. 1. The indentation policy could be a bit more flexible. The options that would be nice to have are 'no indent' and 2-N indents (where N = column width / indent size). 2. The dialog is split 50% for the options and 50% for the preview. This might be easier to use if it were a fixed width for the options (which have a fixed width) and expandable for the preview. Other than those comments, I really like the new feature. It is extremely flexible and powerful. A big win for Eclipse's JDT over other IDEs in my opinion. Thanks for putting this in. It would also be very good to have some support for the chained method syntax that some APIs prefer (for example, jmock.org). (I know this can be a controversial issue for some people.) But for example, the jmock call: mockSubscriber.expects(once()).method("receive").with( eq(message) ).will(returnValue(true)); is typically formatted: mockSubscriber.expects(once()).method("receive") .with( eq(message) ) .will(returnValue(true)); but Eclipse won't do this and insists on doing this: mockSubscriber.expects(once()).method("receive") .with( eq(message) ) .will(returnValue(true)); which is much hardder to read. *** Bug 38822 has been marked as a duplicate of this bug. *** moving to jdt-core for comments / closing Continuation indent support is in since 3.0. This is out of date. Ok to close? (In reply to comment #5) > Continuation indent support is in since 3.0. This is out of date. > Ok to close? There are suggestions here for indentation rules/options that aren't addressed in the current version. Should these be re-submitted as new requests? The description of continuation indent in the java conventions is that it is used to reduce misunderstanding in the code indentation. I don't see how we could expose that many different continuation indent and keep the code formatter preference page simple enough for the user. (In reply to comment #7) > The description of continuation indent in the java conventions is that it is > used to reduce misunderstanding in the code indentation. That's not very clear. Are you saying the code continuation indentation options currently available are based on some existing Java standard that's published somewhere? > I don't see how we could expose that many different continuation indent and keep > the code formatter preference page simple enough for the user. I disagree. The current formatter preference page is organized and laid out well enough that adding additional options would not raise the complexity much, if at all. I don't think we're talking about an infinite number of options, but some additional rules that aren't covered in the current rules. Maybe the thing to do is have each proposed rule/option submitted separately rather than trying to deal with them here (especially since the main point of this request has been addressed). There are some glaring cases where the existing indentation rules are clearly broken. For example: a = b + c; for (int i = 0; i < 1; i++); i = (true ? 1 : 0); (In reply to comment #9) I believe you are confusing the formatter and the auto-indenter. This bug is about formatter problems (does it happen when using Source>Format?). See bug 65317 for continuation problems with auto-indentation. Well, my original report of this problem was marked as a duplicate of this bug, which is why I am here. 65317 is about smart paste, which is not obviously the same thing. These problems occurs whenever you hit TAB to "Correct Indentation". I will just resubmit this as a new bug. No action plan for more continuation indent support. |