Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 493969

Summary: "Organize imports" works incorrect after moving files on FS
Product: [Eclipse Project] JDT Reporter: alexander vladimirov <alcobass>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: major    
Priority: P3 CC: alcobass
Version: 4.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description alexander vladimirov CLA 2016-05-19 01:46:31 EDT
file A is in package org.test.pack1
file B is using file A 

Then I move file A between packages (from pack1 to pack2) in mc, not in eclipse. 
Then I change package declaration of file A (package org.test.pack1 -> package org.test.pack2), so file A doesn'r have errors
Then I press Control-Shift-O in file B, i still have "import org.test.pack1.A" instead of "import org.test.pack2.A"

If I manually remove "import org.test.pack1.A" from file B and then again organize imports, "import org.test.pack2.A" is added as expected, so the problem is for removing imports


-- Configuration Details --
Product: Eclipse 4.6.0.20160505-1302 (org.eclipse.epp.package.java.product)
Installed Features:
 org.eclipse.jdt 3.12.0.v20160428-0800
Comment 1 Eclipse Genie CLA 2019-08-11 13:17:56 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.