How to set maximum line length in Eclipse/STS
This guide will help you to set maximum line length in Eclipse/STS for auto-formatting. Nowadays most of the Java developer uses the integrated development environment (IDE) to write clean and scalable code.
Ctrl + Shift + F is the shortcut key to format the code in Eclipse/STS.
Follow the below steps to set maximum line length of the code in Eclipse/STS:
Step 1: Click on the Window » Preferences
Step 2: Expand the Java » Code Style and click on the Formatter from the left panel
Step 3: Create a custom profile by clicking on the New… button then hit the Edit… button
Step 4: Expand the Line Wrapping menu and the width of the line can be set in the field, Maximum line width
Step 5: To apply the new line length hit the Apply » OK button and press the Ctrl + Shift + F together from your keyboard.
- Installing RabbitMQ Server
- IntelliJ IDEA – Disable Method Chains Inlay Hints
- How to view HTTP headers in Google Chrome
- How to search Java, JSP file in Eclipse IDE?