Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326556

Summary: When formatting an XML file: Splitting attributes to multiple lines behaves incorrectly
Product: [WebTools] WTP Source Editing Reporter: Olli Kallioinen <olli.kallioinen>
Component: wst.xmlAssignee: Nick Sandonato <nsand.dev>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: david_williams, Ed.Merks, nsand.dev
Version: unspecified   
Target Milestone: 3.3 M5   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch nsand.dev: iplog+

Description Olli Kallioinen CLA 2010-09-29 11:52:49 EDT
Build Identifier: 20100617-1415

Enable the "Split multiple attributes each on a new line" option.

Splitting attributes to multiple lines should only put the attribute on a new line if there are multiple attributes in an element.

At least judging from the code this seems to be a bug. It would be nice to have separate options how the formatting should actually work (not only in this case).


Reproducible: Always

Steps to Reproduce:
1. Go to: Window -> Preferences -> XML -> XML Files -> Editor
2. tick "Split multiple attributes each on a new line"
3.
Comment 1 Olli Kallioinen CLA 2010-09-29 11:58:27 EDT
Created attachment 179863 [details]
Patch

Patch to fix the issue. When counting the number of attributes in an element the index for counting is not incremented.
Comment 2 Ed Merks CLA 2011-01-14 11:57:34 EST
Is this bugzilla assigned to a real live human being capable of responding to contributions from the community?
Comment 3 Nick Sandonato CLA 2011-01-14 13:25:24 EST
Code was checked in earlier today, but hadn't resolved it yet.