facebook

One Line Comment Formatting Problem

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #300696 Reply

    pguilmette
    Member

    Would like to know how to configure formatting that when it comes across a line like.

    // this is a line messages

    It formats it like

    //this is a line message

    and not

    // this is a line message

    in other words I do not want the space after the //

    #300710 Reply

    pguilmette,
    You can do that using the following steps
    1. Go to Windows > Preferences > Java > Code Style > Formatter
    2. Select New under Active Profile.
    3. Give a new profile name, leave Initialize settings with the following profile with Eclipse[buit-in].
    4. Check Open edit dialog now and click “OK”
    5. In the new window that opens, go to the comments tab and deselect “Enable Line Comment Formatting” click apply/ok
    This will leave the line comments as they are entered and will not insert the space after //
    Now under active profile of Windows > Preferences > Java > Code Style > Formatter, select the newly created profile.
    Hope this helps.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: One Line Comment Formatting Problem

You must be logged in to post in the forum log in