Bug 383789 - [quick fix] Moving a class via Quick Fix will not refactor the imports anywhere
Summary: [quick fix] Moving a class via Quick Fix will not refactor the imports anywhere
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Linux
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-28 08:40 EDT by Eugen Paraschiv CLA
Modified: 2013-06-27 01:23 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugen Paraschiv CLA 2012-06-28 08:40:00 EDT
Build Identifier: 20120614-1722

If the package of a Java class is manually modified, then a quick fix appears
to move the file in the correct new package. However any imports that were using this class will simply not be updated - resulting in compilation errors in all the classes that were using this class. 

Reproducible: Always
Comment 1 Tomasz Zarna CLA 2012-07-03 09:57:31 EDT
This is pretty similar to bug 383787, where iiuc you're suggesting the quick fix should be more like a refactor action, not just dummy package move. Is that correct?
Comment 2 Eugen Paraschiv CLA 2012-07-03 10:46:22 EDT
Yes, it's pretty similar, and yes, one fix would potentially fix both. I added two bugs, because the failures are related but ultimately different. 
Thanks. 
Eugen.
Comment 3 Ayushman Jain CLA 2012-07-03 12:05:34 EDT
Moving to JDT/UI
Comment 4 Martin Mathew CLA 2013-06-27 01:23:26 EDT
Our current Quick Fix is not capable of handling a fix which require modification in more than one file. In such scenario we have to choose one of the refactoring options available so that the internal consistency of the files are maintained.

We can think of taking this up an improvement point for the current Quick Fix. See also bug 383787
Comment 5 Martin Mathew CLA 2013-06-27 01:23:27 EDT
Our current Quick Fix is not capable of handling a fix which require modification in more than one file. In such scenario we have to choose one of the refactoring options available so that the internal consistency of the files are maintained.

We can think of taking this up an improvement point for the current Quick Fix. See also bug 383787