• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Comments format along with java code

 
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Harikrishna Gorrepati
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Peter. It was a typo error. I unchecked "Enable Javadoc comment formatting" and it worked.
 
reply
    Bookmark Topic Watch Topic
  • New Topic