Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 235462 - [editor] eliminate extraneous new lines after attachment comments
Summary: [editor] eliminate extraneous new lines after attachment comments
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 trivial (vote)
Target Milestone: 3.0.1   Edit
Assignee: Robert Elves CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-03 16:37 EDT by Robert Elves CLA
Modified: 2008-07-04 16:13 EDT (History)
2 users (show)

See Also:


Attachments
mylyn/context/zip (684 bytes, application/octet-stream)
2008-06-09 16:52 EDT, Robert Elves CLA
no flags Details
patch (1.10 KB, patch)
2008-06-12 23:16 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (38.19 KB, application/octet-stream)
2008-06-12 23:16 EDT, Frank Becker CLA
no flags Details
fix (1.04 KB, patch)
2008-06-16 21:45 EDT, Steffen Pingel CLA
no flags Details | Diff
mylyn/context/zip (1002 bytes, application/octet-stream)
2008-06-16 21:45 EDT, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Elves CLA 2008-06-03 16:37:58 EDT
There are a few trailing lines after the comment the results from attachments.
Comment 1 Robert Elves CLA 2008-06-09 16:51:57 EDT
Done.
Comment 2 Robert Elves CLA 2008-06-09 16:52:03 EDT
Created attachment 104218 [details]
mylyn/context/zip
Comment 3 Steffen Pingel CLA 2008-06-10 03:08:37 EDT
I'm still seeing the new lines (e.g. on this same bug). Invoking trim() in SaxMyltiBugReportContentHandler only removed spaces. I believe removing trailing new lines was handled in the old code. Maybe the old functionality can be ported (or reimplemented as this should be trivial)?
Comment 4 Frank Becker CLA 2008-06-12 23:16:44 EDT
Created attachment 104798 [details]
patch

With this patch
Comment 5 Frank Becker CLA 2008-06-12 23:16:51 EDT
Created attachment 104799 [details]
mylyn/context/zip
Comment 6 Steffen Pingel CLA 2008-06-16 21:45:04 EDT
Created attachment 105119 [details]
fix
Comment 7 Steffen Pingel CLA 2008-06-16 21:45:06 EDT
Created attachment 105120 [details]
mylyn/context/zip
Comment 8 Steffen Pingel CLA 2008-06-16 21:45:37 EDT
Rob, please take a look at the patch.
Comment 9 Robert Elves CLA 2008-06-16 21:52:00 EDT
Committed
Comment 10 Steffen Pingel CLA 2008-06-16 22:12:50 EDT
I am not seeing new lines after attachment comments. Has this been fixed as well?
Comment 11 Mik Kersten CLA 2008-06-17 13:07:57 EDT
Great that we fixed this for comments, remaining work is to check it for attachments.
Comment 12 Frank Becker CLA 2008-06-18 10:04:00 EDT
(In reply to comment #11)
> Great that we fixed this for comments, remaining work is to check it for
> attachments.

attachment (id=104798) has a fix for all attributes. The trim removes only spaces from beginning and the end of the text. With the few lines that I added all whitspaces are removed from the end of the string. So the trim only removes space from the start of the string.
Comment 13 Robert Elves CLA 2008-07-04 16:13:31 EDT
Lets keep this localized to task comments for now since we don't know implications of stripping whitespace from others.  If we find a need for cleaning up the other attributes we can revisit this.