Bug 332879 - Organize Imports deletes nearby comments
Summary: Organize Imports deletes nearby comments
Status: VERIFIED DUPLICATE of bug 24804
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.8 M2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-18 00:00 EST by Sam Washburn CLA
Modified: 2011-09-13 05:27 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Washburn CLA 2010-12-18 00:00:33 EST
Build Identifier: M20100211-1343

If I have the following at the top of a file:

import java.io.File; // This is a comment

then go to Source->Organize Imports, the comment disappears.

import java.io.File;

It also happens if the comment is on a nearby line and also if I press the menu shortcut key.

I can't find any workaround without just not organizing imports, but I'm so used to pressing ctrl-shift-o all the time, I'm constantly deleting important stuff at the top of my clients' files.

Reproducible: Always

Steps to Reproduce:
1. Add line: import java.io.File; // This is a comment
2. Choose menu option: Source->Organize Imports
3. Watch the comment disappear :)
Comment 1 Dani Megert CLA 2010-12-20 04:18:12 EST

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