Reputation: 5223
I am planning for code cleanup , lot of places I found code like below which is not easily readable.
To make it readable removing spaces between object and method call like as below
Is there any plugin or eclipse feature available to remove this kind of space automatically from code.
Upvotes: 1
Views: 421
Reputation: 8246
If you highlight the code the press Ctrl+Shift+F
, Eclipse will auto format the code highlighted as per the rules in Window | Preferences | Java | Code Style | Formatter
so just set those rules as per your desire then auto format.
Specifically, in your case just Edit
the Active Profile
and adjust the settings on the Line Wrapping
tab.
Valid as of Eclipse Kepler Service Release 2
Upvotes: 3
Reputation: 1627
Ctrl+A(Select All) and Ctrl+Shift+F(Format) to format your entire file or select the area where you want to format and press Ctrl+Shift+F.
Upvotes: 1