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

Bug 353030

Summary: Rename package hangs
Product: z_Archived Reporter: Lloyd Smith <lloyd.smith>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: critical    
Priority: P3 CC: amj87.iitr, igor
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
small eclipse project created using wizard that can be used to demonstrate bug none

Description Lloyd Smith CLA 2011-07-25 14:58:32 EDT
Build Identifier: 20110615-0604

Trying to rename a package hangs Eclipse forever. This was not always the case and I only noticed it with the upgrade to Indigo.

You rename a package by click on the package name in the Java source file, activating the refactor menu using the keyboard shortcut or right-click menu, and choosing rename.

Eclipse will hang on the "Checking preconditions..." step.

Note: I have the m2e plugin activated and I am using a Maven project.

Reproducible: Always

Steps to Reproduce:
1. Create a new Maven project using the wizard.
2. Create the following files using the new Class wizard:
org/upthescala/eclipse/package1/ExampleClass4.java
org/upthescala/eclipse/package2/ExampleClass2.java
org/upthescala/eclipse/parentpackage1/childpackage1/ExampleClass1.java
org/upthescala/eclipse/paraentpackage1/ExampleClass2.java

3. Open up ExampleClass2.java in the editor.
4. Put the cursor in the 'parentpackage1' text in the package declaration.
5. Right click and choose Refactor > Rename or use the keyboard shortcut.
6. Select all of the options like "rename in text files ...", etc.

Results:
 - Eclipse hangs at the "Checking preconditions..." step.

I am attaching a zip file containing a sample project.
Comment 1 Lloyd Smith CLA 2011-07-25 15:04:47 EDT
Created attachment 200303 [details]
small eclipse project created using wizard that can be used to demonstrate bug

the attached project contains enough to reproduce the problem on my system.

the reproduction recipe references file names that are in this sample project. this project can be trivially created using the wizards, so this is just for the bug investigators and fixers convenience.

please let me know if i can provide more info.
Comment 2 Ayushman Jain CLA 2011-07-25 15:14:03 EDT
Moving to m2e
Comment 3 Igor Fedorenko CLA 2011-07-26 00:53:54 EDT
I am unable to reproduce the problem with Eclipse 3.7 (Indigo) "For Java Developers" distribution using attached sample project and provided steps. If you can reproduce the problem using this distribution, please reopen the bug, but attach your eclipse configuration details and jvm thread dump when eclipse is in "hung" state.
Comment 4 Denis Roy CLA 2021-04-19 13:22:06 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/