Home > Eclipse, Misc > Java line wrapping in Eclipse editor

Java line wrapping in Eclipse editor

Open preferences and search for “Format” or select Java->Code Style->Formatter from the left menu. The default profile is called “Eclipse [built-in]” and if you want to make changes to the Java Formatter you will need to copy it and create your own profile. This can be done with the “New” button right below the profile name.

Once you have created your own Java Formatter, make sure it’s selected and hit the edit button. Select the “Line Wrapping” tab. Under general settings you will see “Maximum line width:”. Set this to a numerical value  such as 180 characters. Save and apply that and return to your code.

Advertisements
Categories: Eclipse, Misc
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: