Bug 49378 - formatter should be able to not indent blocks in case statements
Summary: formatter should be able to not indent blocks in case statements
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.0 M7   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-29 09:25 EST by Nikolay Metchev CLA
Modified: 2004-01-05 17:33 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 Nikolay Metchev CLA 2003-12-29 09:25:48 EST
It is not possible to make the formatter format the switch statement as 
follows:

----------------
switch(3)
{
   case 1:
   {
      break;
   }
   case 2:
   {
      break;
   }
   default:
   {
      break;
   }
}
-----------------------------------
I would like to request a parameter in the formatter to make blocks not 
indented in case statemnets which should facilitate the above formatting!
Comment 1 Olivier Thomann CLA 2004-01-05 14:20:59 EST
This is already doable without any new options.
In Brace>Brace positions>'switch...case' statement, put Next line.
In Brace>Brace positions>Blocks, put Next line.
In Indentation>Switch statement, uncheck "Indent statements within 'switch' body.
You should get the result you expect.
Ok to close?


Comment 2 Nikolay Metchev CLA 2004-01-05 17:33:53 EST
sorry my mistake!