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

Bug 320231

Summary: [rename] rename package with subpackes needs organize imports
Product: [Eclipse Project] JDT Reporter: Sebastian Dietrich <Sebastian.Dietrich>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Sebastian Dietrich CLA 2010-07-19 05:10:15 EDT
Build Identifier: 20100218-1602

I have a package that is the root of a package structure. When I rename the package and select "include subpackages", some imports in classes of my package structure still point to the old package names and thus result in a compile error. Organize imports on the whole package structure helps.

Reproducible: Always

Steps to Reproduce:
1. create a package structure with subpackages
2. create some classes that import classes from other subpackes in the package structure
3. rename the root package
4. some imports still reference the old package names

Workaround: use "organize imports" on the whole package structure after renaming it.
Comment 1 Dani Megert CLA 2010-07-28 09:04:35 EDT
This works fine fore me. Make sure to check the 'Rename subpackagse' option in the rename dialog.

If you still see the problem using
http://download.eclipse.org/eclipse/downloads/drops/R-3.6-201006080911/index.php
then please provide detailed steps and reopen this bug.