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

Bug 46924

Summary: Moving a class to a different package does not update run/debug configs
Product: [Eclipse Project] JDT Reporter: Rob Jones <rob.jones>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Rob Jones CLA 2003-11-19 05:08:36 EST
When you move a (Java) class that has a main()
from one package to another the run/debug configs are not updated.

Example (which will explain better)

Create package 'toplevel'
create class MyMainClass.java
with a main() that say outputs 'hello world' or something.
create a run config
(From menu choose run | run and create a 'new application'
 that uses MyMainClass as its main class)
Optionally Test that you can run your class from the config.

Ok, now create a package 'toplevel.nextlevel'
Now refactor | rename
or drag and drop
MyMainClass from toplevel to toplevel.nextlevel
Any references to the class from other classes are updated
as is the package reference inside the class itself
however the run config remains putting to the old place
and must be manually updated to reflect the new location
of the main class.

Hope that makes sense. If not ask.

Rob
Comment 1 Jerome Lanneluc CLA 2003-11-19 05:20:30 EST
Moving to JDT Debug for comments
Comment 2 Darin Wright CLA 2003-11-19 09:43:46 EST

*** This bug has been marked as a duplicate of 21892 ***