Bug 114097 - [breakpoints] [refactoring] Breakpoint refactorings cannot be undone
Summary: [breakpoints] [refactoring] Breakpoint refactorings cannot be undone
Status: REOPENED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 220355 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-28 09:41 EDT by Darin Wright CLA
Modified: 2011-05-20 10:19 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2005-10-28 09:41:38 EDT
Currently, when a breakpoint refactoring is undone, the breakpoint is simply 
deleted. Not ideal, but due to the following limitation reported in bug 114081.

The problem is an assumption in the perform method of the change objects of the
debug rename participants: An IResource for the new element is retrieved and
used to create a new breakpoint, but in case of an undo the resource does not
(yet) exist.

This is not a problem during normal execution: There, the participant changes
get executed AFTER the refactoring changes, thus the new renamed element 
exists,
and so does its resource.

However, when performing the undo change, the order is reversed: The 
participant
changes get executed BEFORE the refactoring changes, thus the new renamed
element does not exist, and the resource does not exist either.

The undo change should probably be changed back to a NullChange for M3. A real
solution would either require code without assumptions about element existence
or reversing the execution order (for example, on participant request).
Comment 1 Darin Wright CLA 2005-11-29 16:40:10 EST
Deferred
Comment 2 Michael Rennie CLA 2009-08-18 10:53:18 EDT
reopening
Comment 3 Michael Rennie CLA 2011-05-20 10:19:54 EDT
*** Bug 220355 has been marked as a duplicate of this bug. ***