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

Bug 287206

Summary: Deleting the class with the main method also deletes the Run/Debug configuration that uses that main
Product: [Eclipse Project] Platform Reporter: G. Tranter <gordont>
Component: DebugAssignee: Platform-Debug-Inbox <platform-debug-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: major    
Priority: P3 CC: darin.eclipse
Version: 3.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description G. Tranter CLA 2009-08-20 11:57:46 EDT
Build ID: I20090313-0100

Steps To Reproduce:
1. Create a Java project with a class library that contains a main method for running the application.
2. Create a Run/Debug configuration that specifies the main class.
3. Override the library main class with a new one in your project's source (being sure it compiles and also has a main method.)
4. Delete the main class from your source folder.
5. Look for the Run/Debug configuration - it is gone.

Also - if you "Undo" the class delete - the Run/Debug configuration does not get restored.



More information:
This is a major pain.  I override main classes all the time for local testing.
Comment 1 Prakash Rangaraj CLA 2009-08-20 13:48:59 EDT
As a workaround Preferences->Run/Debug->Launching->Launch Configurations. Uncheck the 'Delete configurations when the associated resource is deleted' That should keep your launch configs.

Assigning to Debug component
Comment 2 Darin Wright CLA 2009-08-20 13:56:13 EDT

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