Bug 244395 - [refactoring] [launch config refactoring] project rename cannot undo
Summary: [refactoring] [launch config refactoring] project rename cannot undo
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M3   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, contributed
Depends on:
Blocks:
 
Reported: 2008-08-18 03:19 EDT by Feng(Marvin) Wang CLA
Modified: 2008-10-15 14:22 EDT (History)
2 users (show)

See Also:


Attachments
fix the cannot undo/redo bug (1.03 KB, patch)
2008-09-03 01:14 EDT, Feng(Marvin) Wang CLA
Michael_Rennie: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Feng(Marvin) Wang CLA 2008-08-18 03:19:39 EDT
Build ID: I20080617-2000

Steps To Reproduce:
1. create a launch config in a java project.

2. rename the java project. The launch config will refactored (org.eclipse.jdt.launching.PROJECT_ATTR attribute in the launch config will change).

3.Undo the rename operation (press Ctrl+z in Package Explorer view).

4. Now the launch config will disappeared.


More information:
Comment 1 Feng(Marvin) Wang CLA 2008-08-18 03:57:23 EDT
I found that if you perform a undo against a Java project rename operation, the <listEntry value="/PROJECT_NAME"/> element in the launch config file will not refectored.

(In reply to comment #0)
> Build ID: I20080617-2000
> 
> Steps To Reproduce:
> 1. create a launch config in a java project.
> 
> 2. rename the java project. The launch config will refactored
> (org.eclipse.jdt.launching.PROJECT_ATTR attribute in the launch config will
> change).
> 
> 3.Undo the rename operation (press Ctrl+z in Package Explorer view).
> 
> 4. Now the launch config will disappeared.
> 
> 
> More information:
> 

Comment 2 Feng(Marvin) Wang CLA 2008-09-03 01:14:54 EDT
Created attachment 111550 [details]
fix the cannot undo/redo bug

before applying this patch, 
1. create a debug config by running a Java class contains "main" method.
2. rename the associate Java project by refactoring->rename context menu.
3. press Ctrl+z undo the rename operation.
4. press Ctrl+y perform redo.

After step 4, it will jump out a warning box said "'Rename Java Project' cannot be redone. Reason: The launch configuration "***" no longer exists".

After applying the patch,
You can undo/redo project rename operation many times.
Comment 3 Darin Wright CLA 2008-09-03 08:54:55 EDT
Thanks for the patch, will consider for 3.5.
Comment 4 Michael Rennie CLA 2008-10-15 14:21:23 EDT
applied patch
Comment 5 Michael Rennie CLA 2008-10-15 14:22:51 EDT
verified, thanks for the fix Feng.