Bug 386316 - No new line before the last end tag when children inserted from Design or Outline context menu
Summary: No new line before the last end tag when children inserted from Design or Out...
Status: NEW
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: 4.0   Edit
Assignee: wst.xml-triaged CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2012-07-31 08:49 EDT by Meng-Yuan Huang CLA
Modified: 2013-06-19 11:14 EDT (History)
3 users (show)

See Also:


Attachments
XML file generated by Eclipse XML Editor with missing a new line character (27 bytes, text/plain)
2012-07-31 08:49 EDT, Meng-Yuan Huang CLA
no flags Details
How to reproduce this problem (deleted)
2012-07-31 10:36 EDT, Meng-Yuan Huang CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Meng-Yuan Huang CLA 2012-07-31 08:49:18 EDT
Created attachment 219368 [details]
XML file generated by Eclipse XML Editor with missing a new line character

I use Eclipse XML Editor for editing XML files.
However, I find XML file created by this tool misses a new line character
before the last end tag.

For example:
<a> 
	<b></b>
	<c></c></a>

What I expect is:
<a> 
	<b></b>
	<c></c>
</a>

Could fix this problem?
Comment 1 Nitin Dahyabhai CLA 2012-07-31 09:49:25 EDT
How was this "generated"?
Comment 2 Meng-Yuan Huang CLA 2012-07-31 10:36:47 EDT
Created attachment 219382 [details]
How to reproduce this problem
Comment 3 Meng-Yuan Huang CLA 2012-07-31 10:38:48 EDT
(In reply to comment #1)
> How was this "generated"?

Sorry, Eclipse XML Editor also generates this line:
<?xml version="1.0" encoding="UTF-8"?>

I recorded a video to show the steps to produce this problem.
The video, "How to reproduce this problem (EclipseXmlEditor.avi)," encoded in XviD has been attached in this discussion thread.
Comment 4 Nitin Dahyabhai CLA 2012-07-31 14:13:55 EDT
I think something went wrong with attachment 219382 [details].  Perhaps you could write out the directions?
Comment 5 Meng-Yuan Huang CLA 2012-07-31 14:42:39 EDT
(In reply to comment #4)
> I think something went wrong with attachment 219382 [details].  Perhaps you
> could write out the directions?

I don't know why the video was deleted.

Sorry, please try to download EclipseXmlEditor.avi again here:
https://skydrive.live.com/#cid=87CEF5E6683B5427&id=87CEF5E6683B5427%21492
Comment 6 Salvador Zalapa CLA 2012-07-31 15:13:34 EDT
You need to perform a manually format:

*Right click on the file, Sorce -> Format, or
*Switch to the Source pane and perform ctrl+shift+F
Comment 7 Meng-Yuan Huang CLA 2012-07-31 15:36:47 EDT
(In reply to comment #6)
> You need to perform a manually format:
> 
> *Right click on the file, Sorce -> Format, or
> *Switch to the Source pane and perform ctrl+shift+F

Thanks, Salvador Zalapa.
However, I think it would be more convenient if
Eclipse XML Editor could automatically generate well-formatted XML files.
Is it possible?
Comment 8 Nick Sandonato CLA 2012-08-21 12:55:12 EDT
Seems like this could be a new feature to keep code formatted when editing through the design pane.