Bug 116858

Summary: java code formatter problem with switch statements and comments
Product: [Eclipse Project] JDT Reporter: Frederic <feniks>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: trivial    
Priority: P3    
Version: 3.1   
Target Milestone: 3.2 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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