Skip to main content

Eclipse: Set maximum line length for auto formatting?


I am working with Java. If I hit Ctrl + Shift + F in Eclipse Helios, it will auto format my code. At a certain point, it wraps lines. I would like to increase the maximum line length. How can I do this?



Source: Tips4allCCNA FINAL EXAM

Comments

  1. In preferences Java -> Code Style -> Formatter, edit the profile. Under the Line Wrapping tab is the option for line width (Maximum line width:). you will need to make your own profile.

    ReplyDelete
  2. Comments have their own line length setting at the bottom of the setting page java->code style->formatter-> Edit... ->comments

    ReplyDelete
  3. Click Project->preferences. Type format into the search - you should see java->code style->formatter. Click that, then edit - finally, the line wrapping tab - its there :)

    ReplyDelete
  4. for XML line width, update preferences > XML > XML Files > Editor > Line width

    ReplyDelete

Post a Comment

Popular posts from this blog

Wildcards in a hosts file

I want to setup my local development machine so that any requests for *.local are redirected to localhost . The idea is that as I develop multiple sites, I can just add vhosts to Apache called site1.local , site2.local etc, and have them all resolve to localhost , while Apache serves a different site accordingly.