Bug 32604 - Organize Imports deletes comment lines between import - statements [code manipulation] [general issue]
Summary: Organize Imports deletes comment lines between import - statements [code mani...
Status: VERIFIED DUPLICATE of bug 24804
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows NT
: P3 minor (vote)
Target Milestone: 3.8 M2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-24 03:34 EST by Florian Georg CLA
Modified: 2011-09-13 05:26 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Georg CLA 2003-02-24 03:34:18 EST
The junitdoclet tool automatically generates JUnit testcases with 
comments as "markers", which initially look like this :
===========
package xxxx;

import junit.framework.TestCase;
// JUnitDoclet begin import
import de.innovations.inreport.engine.data.DataVO;
// JUnitDoclet end import

[...]
===========

If I use the Organize-Import feature the first time, it changes to 
===========
package xxxx;

import java.util.Vector;

import junit.framework.TestCase;
// JUnitDoclet end import

[...]
===========

Note that the marker-comment (//JUnitDoclet begin import) has been deleted.

If I manually change the source, so that there is no import before the "begin-
import"-Marker like this :

===========
package xxxx;

// JUnitDoclet begin import
import junit.framework.TestCase;
import java.util.Vector;
// JUnitDoclet end import
[...]
===========
.. everything works fine. No deleted lines, and all new imports being inserted 
between the begin-end - markers.
Comment 1 Dirk Baeumer CLA 2003-02-24 08:28:45 EST
This is correct, but we have to live with it for 2.1. 
Comment 2 Dani Megert CLA 2009-02-05 02:34:06 EST

*** This bug has been marked as a duplicate of bug 24804 ***
Comment 3 Satyam Kandula CLA 2011-09-13 05:26:24 EDT
Verified for 3.8M2 using build I20110912-0800