简体   繁体   中英

xml format eclipse attributes

In Eclipse Helios, it's possible to format XML like this:

<element
   att1="1"/>

But with the same settings, this won't work in Kepler or Luna, it always looks like this:

<element att1="1"/>

For two and more attributes it's the same and expected behaviour (every attribute in a separate line) in all three releases.

I'm unsure if this is a feature or some kind of a bug. Is there a way I can get the old behaviour?

I suspect it's because of the lesser value for Line width . Can you check what's the line width set in both Helios & others?

Go to Window > Preferences > XML > Editor .

Try setting Line width to a higher value (like 70 or 80) depending on your preference.

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