简体   繁体   中英

How do I extend the margin of the Eclipse source formatter?

Whenever I use Source > Format in Eclipse, it wraps the line starting at row 80. But my program has a lot of long lines and I'd like to extend its tolerance to 120. I've tried searching for a setting where I can change this but can't find one. Can this be done?

You can find it under Preferences -> Java -> Code Style -> Formatter .

Click on the Edit button next to the currently active profile, go to the Line Wrapping tab and change the Maximum line width setting.

Go to Window/Prefences and open Java/Code Style Formatter. Then edit the profile. You can change the margin on the "Line Wrapping" tab ("Maximum line width").

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM