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?
This question is related to
java
eclipse
formatting
ide
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 :)
For XHTML files: Web -> HTML Files -> Editor -> Line width
Take a look of following image:
Java->Code style->Formatter-> Edit
Preferences -> Java -> Code Style -> Formatter / "Edit..."
Tabs: "Line wrapping" , "Comments"
Field: "Maximum line width"
Set both to make comments have the same length too. You might need to create a new profile if you don't have one already.
for XML line width, update preferences > XML > XML Files > Editor > Line width
I use the Eclipse version called Mars which works with Java 7.
Go to Preferences -> Java -> Code Style -> Formatter
Click on the Edit Button shown in the right side of "Active Profile" drop down
Tabs: "Line wrapping"
Field: "Maximum line width", Set the desired value (Default value set to 120) to increase/decrease the line length in the editor
Note: Remember to rename the Active profile to the name of your choice, as the default Eclipse profile won't accept your changes.
For HTML / PHP / JSP / JSPF: Web -> HTML Files -> Editor -> Line width
Comments have their own line length setting at the bottom of the setting page java->code style->formatter-> Edit... ->comments
Source: Stackoverflow.com