5

I make all according this question: Eclipse: Set maximum line length for auto formatting?.

my result: enter image description here

I tryed to make own profile. profile was created:

enter image description here

before ctrl+shift+f : enter image description here

after:

enter image description here

How to fix it?

3
  • 1
    It looks like you're formatting XML, but those are the options for Java formatting... Commented Jan 20, 2014 at 7:12
  • It is true. and how to set maximum length for xml? Commented Jan 20, 2014 at 7:14
  • Look in the XML preferences section instead of the Java preferences. Commented Jan 20, 2014 at 7:18

4 Answers 4

7

Goto How to Change the Default Format Settings in Eclipse

Follow the steps to create a new profile. Step 11 [Line Wrapping] shows a 'Maximum line width' field, changing that would fix your issue.

Also, make sure your newly created profile is selected in the Active Profile drop-down inside Window -> Preferences -> Java -> Code Style -> Formatter.

If you are trying to format XML: Goto Window -> Preferences -> XML -> XML Files -> Editor and change Line width field.

Sign up to request clarification or add additional context in comments.

Comments

1

right answer: enter image description here

P.S. thanks Jon Skeet

Comments

0

You must have to create your own profile

In eclipse Window-> preferences -> Java -> Code Style -> Formatter, edit the profile. Under the Line Wrapping tab there is the option for line width (Maximum line width)

Comments

0

In preferences Java -> Code Style -> Formatter, if you don't have your own existing profile then create new with Eclipse[built-in] or select and edit the profile. Under the Line Wrapping tab is the option for line width (Maximum line width:).

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.