This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, I have the following java code plus comments and want to keep the same format in Eclipse java file. But, when I say Ctrl+Shift+F (Format option), I am loosing all format. Please advice what should I do ?
Go to Windows | Preferences | Java | Appearance | Formatter and click Edit next to the active profile. On the Profile dialog, click that Comments button and uncheck the various settings. For this particular comment, unchecking "Enable block formatting" should be sufficient.
But personally, I would change this comment into a javadoc comment for the either the class of the main method, using HTML tags for the options (a..g).
By the way, either your post has a typo or you are missing the '/' on line 25 after the '*' to end the comment.