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

Bug 498404

Summary: [typing] Unexpected code formatting for basic anonymous classes while typing
Product: [Eclipse Project] JDT Reporter: Peter Swulius <pswulius>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 4.6   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug
Attachments:
Description Flags
Screenshot of the editor none

Description Peter Swulius CLA 2016-07-24 18:36:34 EDT
Created attachment 263279 [details]
Screenshot of the editor

Strange issue only occurs while typing.  Issuing a Ctrl-Shift-F formats it according to your java formatter settings.

Type this much...

    Link link = new Link( "foobar" )

Press <ENTER>, and add the open & closing braces, and get this...

    Link link = new Link( "foobar" )
            {
                <- cursor here
            }

Expected results:

    Link link = new Link( "foobar" )
    {
        <- cursor here
    }

I would expect the braces to not have extra indentation.

First noticed in Juno.  
Still reproduceable in Neon.
Behavior as expected in Indigo.
Comment 1 Eclipse Genie CLA 2020-01-10 07:42:09 EST
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.

If you have further information on the current state of the bug, please add it. 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.