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

Bug 12746

Summary: refactoring support for launch configurations
Product: [Eclipse Project] JDT Reporter: Carolyn MacLeod <carolynmacleod4>
Component: DebugAssignee: Darin Wright <darin.eclipse>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P2 CC: alex.blewitt, alvin, andy.w.freeman, Darin_Swanson, dirk_baeumer, erich_gamma, h_heinecke, jaeger, lynne_kues
Version: 2.0   
Target Milestone: 3.0 M8   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Carolyn MacLeod CLA 2002-04-03 19:40:38 EST
20020402
Single-click launch doesn't work if you move the class.
   - enable single-click launch
   - create a class in package 'test'
   - run the class
   - move the class to package 'menutest'
   - run again
You get an error in the console, similar to the following:
java.lang.NoClassDefFoundError: test/MenusWithIcons
Exception in thread "main"
Comment 1 Darin Wright CLA 2002-04-03 20:50:08 EST
Do not intend to address for 2.0, this is really a refactoring issue.
Comment 2 Carolyn MacLeod CLA 2002-04-04 09:40:10 EST
This is a pretty bad problem, particularly if "single-click launch" is on by 
default (which, I understand, it should be and will be).
So if this is a refactoring problem, we should let the refactoring people know.
CC'ing EG.
Comment 3 Darin Wright CLA 2002-04-04 09:54:04 EST
I agree it is a problem, but not a common one. How often do programmers usually 
change the name of their main class? I argue that is is not often. The old 
launching support did not handle this problem well either - it deleted the 
history item rather than updating the launch history item.
Comment 4 Carolyn MacLeod CLA 2002-04-04 10:17:09 EST
I rename main classes all the time - it is very common for me to do this.
I start with a little example swt class, copy it, rename the copy, modify code, 
and run the new (renamed) class.
I never had a problem with the old stuff.
The very first drop I run in with the new stuff, and I have a problem that is a 
real pain to work around - I had to turn off single-click, run, get the dialog, 
make the changes, save the changes, and turn single-click back on. If I didn't 
know the option existed (most newbies won't), I would have been completely and 
totally stuck, unable to run my class, and with no idea why not, or what to do 
to work around it.
Comment 5 Carolyn MacLeod CLA 2002-04-04 10:59:13 EST
This is worse than I thought. I can't turn single-click back on and then run 
the class. i.e. My main class that is in a new package will never run again 
under single-click. It insists on trying to go back to the original (bogus) 
package name. At least fix this. If someone modifies the launch configuration, 
please honour that modification if they turn single-click back on.
Comment 6 Darin Wright CLA 2003-04-02 09:20:06 EST
*** Bug 35962 has been marked as a duplicate of this bug. ***
Comment 7 Darin Wright CLA 2003-05-12 15:33:20 EDT
Re-opening for 3.0. We plan to plug into the JDT refactoring support.
Comment 8 Darin Wright CLA 2003-05-12 16:07:07 EDT
*** Bug 17453 has been marked as a duplicate of this bug. ***
Comment 9 Darin Wright CLA 2003-05-26 16:28:28 EDT
*** Bug 32009 has been marked as a duplicate of this bug. ***
Comment 10 Erich Gamma CLA 2003-05-28 05:58:57 EDT
FYI - Dirk is using this the launch config updating as a use case for 
refactoring participants.
Comment 11 Alex Blewitt CLA 2003-05-28 18:20:15 EDT
*** Bug 32009 has been marked as a duplicate; however, bug 32009 describes
the fact that removal of a project does not remove the launch configs as well.
Not sure whether that's precisely the same as this bug, or whether they will
both be actioned by the same fix, but before verifying the duplicate I'd just
like to add this comment in the older bug.
Comment 12 Darin Swanson CLA 2003-08-01 12:44:42 EDT
*** Bug 41030 has been marked as a duplicate of this bug. ***
Comment 13 Darin Swanson CLA 2003-10-07 11:46:46 EDT
*** Bug 44317 has been marked as a duplicate of this bug. ***
Comment 14 Andrew Freeman CLA 2003-11-03 10:50:02 EST
*** Bug 45961 has been marked as a duplicate of this bug. ***
Comment 15 Darin Swanson CLA 2003-12-03 17:34:39 EST
*** Bug 48037 has been marked as a duplicate of this bug. ***
Comment 16 Luc Bourlier CLA 2004-01-26 19:24:04 EST
Released some refactoring support for launch configurations.
The launch configurations are updated for :
- project renaming
- Java type renaming
- Java file (compilation unit) renaming (will work after a one line fix in the
compilation unit processor)
Comment 17 Darin Wright CLA 2004-02-12 12:27:55 EST
Luc, is this complete, or is there still some work in M8?
Comment 18 Dirk Baeumer CLA 2004-02-12 13:09:50 EST
JDT.DEBUG.UI should listen to package renames as well. 

And to moves of CUS and types as soon as move participants are implemented 
which will be the case with M8.
Comment 19 Luc Bourlier CLA 2004-03-11 18:20:20 EST
Released support for package renaming.
Comment 20 Luc Bourlier CLA 2004-03-11 18:22:07 EST
Please verify, Darin W.
I create bug 54557 for the 'move type' case.
Changes in org.eclipse.jdt.internal.debug.core.refactoring and jdt.debug.ui
plugin.xml.
Comment 21 Darin Wright CLA 2004-03-12 11:07:21 EST
Verified.