Bug 102939

Summary: Organize imports deletes comments
Product: [Eclipse Project] JDT Reporter: John Arthorne <john.arthorne>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, satyam.kandula
Version: 3.1   
Target Milestone: 3.8 M2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description John Arthorne CLA 2005-07-06 16:44:42 EDT
Build: 3.1

1) Start with this compilation unit:

package p2;
import java.util.*;
import java.awt.*;
//remove ambiguity on List
import java.util.List;

public class A {
	List list;
	Collection colx;
	Vector v;
	ArrayList al;
	Image i;
	Insets insets;
	JobAttributes ja;
}

2) Organize Imports.

-> The comment in the imports is deleted.  I think organize imports shouldn't be
deleting user comments.
Comment 1 Martin Aeschlimann CLA 2006-06-16 06:04:41 EDT
No plans here. Add import tries its best to keep the comments, but organize import  needs the full freedom with the import declarations.
Comment 2 Dani Megert CLA 2009-02-05 02:32:20 EST

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