Bug 116858 - java code formatter problem with switch statements and comments
Summary: java code formatter problem with switch statements and comments
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 trivial (vote)
Target Milestone: 3.2 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-17 06:58 EST by Frederic CLA
Modified: 2005-12-12 11:30 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 Frederic CLA 2005-11-17 06:58:20 EST
Using the java code formatting I get the following:
        int i = 0;

        switch (i) {
            case 0:
                // handling 0
                System.out.println("Case was 0");
            // fall through

            case 1:
                // handling 1.
                // some additional remark (also handles 0).
                System.out.println("Case was 0 or 1");
                break;

            case 2:
            // fall through

            default:
                // some default action
                System.out.println("Case was :" + i);
        }

I would like to see the "fall through" to be indented, but it does not seem to 
be possible.
Comment 1 Olivier Thomann CLA 2005-11-23 15:39:32 EST
Fixed and released in HEAD.
Added regression test org.eclipse.jdt.core.tests.formatter.FormatterRegressionTests.test609
Comment 2 Frederic Fusier CLA 2005-12-12 11:30:31 EST
Verified for 3.2 M4 using build I20051212-0010