In preferences Java -> Code Style -> Formatter, edit the profile. Under the Line Wrapping tab is the primary option for line width (Maximum line width:). In the Comments tab you have a separate option Maximum line width for comments:, which will also need to be changed to affect comment wrapping.
You will need to make your own profile to make these changes in if you using one of the
[Built-in] ones. Just click "New..." on the formatter preferences page.
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.
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 XHTML files:
Web -> HTML Files -> Editor -> Line width
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 HTML / PHP / JSP / JSPF:
Web -> HTML Files -> Editor -> Line width
for XML line width, update preferences > XML > XML Files > Editor > Line width
Comments have their own line length setting at the bottom of the setting page java->code style->formatter-> Edit... ->comments
Take a look of following image:
Java->Code style->Formatter-> Edit
- Eclipse: Set maximum line length for auto formatting right?
- Eclipse: Set maximum line length for auto formatting?
- Issue setting max line length for PEP8 in Eclipse
- Formatting Java enums using one line for every enum value with Eclipse
- Wrapping chained method calls on a separate line in Eclipse for Java
- How to make Eclipse prompt me for command line arguments
- Vertical line between matching curly braces for java in eclipse
- How can I set the current line of execution in the eclipse java debugger?
- Set Build path in Eclipse for ndk program
- Code formatting utility for Clojure in Eclipse
- Can I set Eclipse to only emit errors, warnings, etc. for the current project?
- How to set charset encoding property for SVN File and Eclipse
- Eclipse content assist auto appends type for variable
- How do I modify the set method signature that Eclipse auto generates?
- How to set up the Eclipse for remote C debugging with gdbserver?
- Set default java compliance level for Maven projects in Eclipse
- Auto generate comments (documentation) for functions in eclipse CDT
- Increased line height for Consolas font in Eclipse
- How to use different line wrapping for strings and other items in Eclipse for Java
- How can I set Chrome as default external browser in Eclipse for Mac?
- removing line numbers for copied code in eclipse
- Eclipse - how to simultaneously switch working set for project explorer, call hierarchy, and search?
- Disabling Eclipse code formatting for part of a javadoc
- Set Environment Variable At Eclipse workspace level for all launchers?
- How to set up remote development in Eclipse for Python? (the "remote" part)
- How do I set the Java Doc for google drive api for android in Eclipse
- Eclipse cleanup code-style for entire package/class set
- Eclipse Java 8 Auto completion for Lambda expressions
- How should I set up Eclipse when preparing for a presentation or demo?
- Set vm default arguments via maven for eclipse
More Query from same tag
- How to make Eclipse automatically show selected file in explorer?
- I moved my eclipse workspace, and now all my files are missing src
- Eclipse isn't updating custom methods in JSP scriptlets
- Java: synchronizing standard out and standard error
- android - Heap Size Increasing per activity
- Maven : No compile errors but still cant find symbol
- Exception when I try to run a liferay portlet on my tomcat server
- How can I compile a Java program in Eclipse without running it?
- Tomcat/Eclipse: disable HttpSession serialization during context reload
- log4j console warnings
- Failure 1 (near "table": syntax error) on 0x39c298 when preparing 'CREATE TABLE table (
- How can I get Eclipse to recognize my Nexus 7?
- How to clean/delete a Maven project's "target" dir in Eclipse
- Eclipse: how to launch URL with fragment?
- how to unlock toolbar in Eclipse luna
- How to disable JBoss Tools editors in Eclipse?
- Can't run groovy script in Groovy Grails Tool Suite
- Cannot create a new android application on eclipse
- eclipse import project using command line
- Remote Debugging Fails with IntelliJ but works with Eclipse?
- Can formatting a Spock Specification be controlled in Eclipse/STS?
- Maven: 'Package does not exist' (and other errors)
- Problem with linking to other project in Android Eclipse environment
- Can I run a RAP-Application on Glassfish?
- Compile different languages on Eclipse
- How to connect PostgreSQL with Spring Mvc
- All maven modules and submodules are shown in the root tree list
- ECLIPSE: How to export the smallest jar file
- Eclipse servlet error
- Where is the connect tab within eclipse?