Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 365949

Summary: [typing] Newlines in enum constructor arguments prevent indenting from returning to the right place
Product: [Eclipse Project] JDT Reporter: Joshua Goldberg <joshgold>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, markus.kell.r
Version: 3.8   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Joshua Goldberg CLA 2011-12-07 14:06:38 EST
Build Identifier:   Eclipse IDE for Java Developers	1.3.2.20110301-1807	epp.package.java

Newlines in enum constructor arguments create a big indent that isn't "recovered" following the closing parenthesis.

simple e.g.:

enum X {
            A(a,b),
            B(c,
                    d),
                    C(e,f),
                    D(g,
                            h),
                            E(
                                    i,j),
                                    F(k,l),
                                    G(m,n);
        }

Reproducible: Always

Steps to Reproduce:
Indent enum code with a newline inside the parentheses for constructor arguments
Comment 1 Markus Keller CLA 2011-12-07 14:14:40 EST
In I20111205-1800, the formatter works fine (with "Never join lines" enabled). But "Correct Indentation" and the Enter key after ")," indeed indent too much.
Comment 2 Eclipse Genie CLA 2020-03-11 14:00:03 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.