Bug 297546 - [formatter] Formatter removes blank after @see if reference is wrapped
Summary: [formatter] Formatter removes blank after @see if reference is wrapped
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.6 M5   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 270943 299801 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-10 18:43 EST by Michael Paetzold CLA
Modified: 2010-02-02 04:48 EST (History)
5 users (show)

See Also:


Attachments
demo video showing problem when formatting on save (748.13 KB, video/x-msvideo)
2009-12-10 19:07 EST, Michael Paetzold CLA
no flags Details
Simple test case showing the problem (374 bytes, text/plain)
2009-12-17 11:20 EST, Frederic Fusier CLA
no flags Details
Proposed patch (3.78 KB, patch)
2009-12-18 08:40 EST, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Paetzold CLA 2009-12-10 18:43:32 EST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.10 (karmic) Firefox/3.5.5
Build Identifier: 20090920-1017

Formatter converts

    /*
     * (non-Javadoc)
     * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
     */

to

    /*
     * (non-Javadoc)
     * @seeorg.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.
     * IApplicationContext)
     */

Wrapping at '.' seems okay, but removing ' ' after @see is definitely wrong. JDoc is not worrying about, but it looks awful.

Reproducible: Always

Steps to Reproduce:
1. insert example
2. set max line length to 80 (default)
3. format the source code
Comment 1 Michael Paetzold CLA 2009-12-10 19:07:49 EST
Created attachment 154279 [details]
demo video showing problem when formatting on save

demo video showing problem when formatting on save
Comment 2 Frederic Fusier CLA 2009-12-17 11:20:35 EST
Created attachment 154675 [details]
Simple test case showing the problem

Copy this simple compilation unit in the org.eclipse.jdt.core package created in a simple java project and format it...
Comment 3 Frederic Fusier CLA 2009-12-18 08:40:11 EST
Created attachment 154769 [details]
Proposed patch

This patch fixes the problem by not trimming the too long sequence of tokens which is finally kept on the same line...
Comment 4 Frederic Fusier CLA 2009-12-18 08:49:57 EST
Released for 3.6M5 in HEAD stream.

All JDT/UI and JDT/Text tests are OK.
Comment 5 Satyam Kandula CLA 2010-01-25 05:36:39 EST
Verified for 3.6M5 using Build id: I20100122-0800
Comment 6 Srikanth Sankaran CLA 2010-01-25 05:38:09 EST
Verified.
Comment 7 Frederic Fusier CLA 2010-02-02 04:44:39 EST
*** Bug 299801 has been marked as a duplicate of this bug. ***
Comment 8 Frederic Fusier CLA 2010-02-02 04:48:58 EST
*** Bug 270943 has been marked as a duplicate of this bug. ***