Bug 297546

Summary: [formatter] Formatter removes blank after @see if reference is wrapped
Product: [Eclipse Project] JDT Reporter: Michael Paetzold <paetzold.michael>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: hceylan, jared_burns, Olivier_Thomann, satyam.kandula, srikanth_sankaran
Version: 3.6   
Target Milestone: 3.6 M5   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
demo video showing problem when formatting on save
none
Simple test case showing the problem
none
Proposed patch none

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. ***