Community
Participate
Working Groups
when I changed the package from one to other for a class, the path was updated correctly, but when I typed the class name in the edit window, the word auto complete process imported the wrong package, it imported the original package, and when I typed within the import section, the tip showed two package, first one was with the origin package, another one was with the new package, I have cleaned my project for many times, and recompiled my project for many times, but it still here, I think it is a bug for the platform. Thanks for your solving.
Here is the version information about my JDT, the platform description is " Eclipse IDE for Java EE Developers - Windows" Eclipse Java Development Tools Version: 3.3.2.r33x_r20080129-7o7jE7_EDhYDiyVEnjb1pFd7ZGD7 Build id: M20080221-1800
I'm not sure I understand the problem. Could you please provide detail steps to reproduce?
sorry for not answer in time. here is the operation step: 1.create a java project 2.create a package named PA 3.create a class named A under the package PA 4.create a new package named PB 5.compile this project 6.create a class named B under the new package PB 7.open class A for edit 8.in the package section, change the package from PA to PB 9.left side of the edit window,error tip at the package line 10.click on the error tip icon 11.a little panel appeared 12.two options on the panel 13.first is move the java file to package PB,second is change the package PB to package PA 14.select first option to move the java file to package PB 15.refactory process complete 16.compile this project again 17.create a field named fa with type A exclude the package path for class B 18.press the hot keys(CTL+SHIFT+o) for organizing the import, then you will find the issue, some times it imports the class A with wrong package(the original one before changed package), some times it shows an error message dialog for some nested error, in the import section, insert an import, type the package with PA, type dot, and then a help panel appears, the name of class A on it, that is wrong, because the class A is moved to package PB, why it appears here? that is the detial operating step, for your reference. By the way, thanks for your answer, it is just a small bug and will not influence another things, but it will delude the developer, no error when editing, errors will be found when compile the project, if the developer do not check the import section, just press the hot key to organizing the import, some things amaze him. The first time I found this issue is with eclipse 3.1, I do not think it is a big things at first, but when I develop a big project, this issue delude me.
According to step 18, this is a problem with Organize Import. Moving to JDT/UI for investigation.
The problem is that the 'Move CU to package p' quick fix does not add a import to the current package. The fix is to use 'Organize Import' after applying the quick fix. I think that's acceptable. No fix planed at the moemnt