Bug 210549 - [formatter] simple 'case'-es
Summary: [formatter] simple 'case'-es
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-21 11:55 EST by Nagy Zoltan CLA
Modified: 2007-11-21 12:00 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nagy Zoltan CLA 2007-11-21 11:55:49 EST
in 'java formatting/control statements'
an option for:
 keep simple 'case' on one line would be very useful
- i always write my code in this way, because i use switch in lot's of places ex:

switch(viewMode)
{
	case	M_MENU:
			menu.push(_code);
		break;
	case	M_EDITOR:
			functionRouter.push(_code);
		break;
	case	M_PLOT:
			throw new SystemModeException(org.kirk.fcalc.DisplayManager.M_EDITOR);
	default:
		throw new  NoticeException("okay, button pressed - view unknown...now what?");
}

can be became something like this..

switch(viewMode)
{
	case	M_MENU:  menu.push(_code);            break;
	case	M_EDITOR:functionRouter.push(_code);  break;
	case	M_PLOT:
        	throw new SystemModeException(DisplayManager.M_EDITOR);
                break;
	default:
		throw new  NoticeException("okay, button pressed - view unknown...now what?");
                break;
}

and thank you all, for this very powerfull platform - it's formatter is the best i've ever seen.
since i use eclipse - the formatting time i've spent is only the time spent on it's configuration ;)