Closed reprogrammer closed 13 years ago
Formatted file before starting the actual instrumentation in d7e1b417222a858461cf7ca51368fdfdfa6d824f .. d0142c159fe32fa37af02eacaa81acd6019f3b07.
Captured cancelled and performed invocations of the use super type refactoring in bf107c1de603e07fffec600d24196dfef529dd52.
Added automated tests for cancelling and performing use super type refactoring in 26708f7e2fa8d8d388a9ad7d01741dc1ddb7f1ca.
There is a pathological case with the way we using UseSupertypeInputPage#initializeRefactoring()
. The code always sets the supertype to the value of the selected element when a selection change has occurred. However, it is possible that the user clicks on a vacant spot in the refactoring dialog, thus causing a selection change but not selecting any valid type at all (a null selection). In this case, calling the current implementation of initializeRefactoring()
will cause a NullPointerException
assertion failure. The code should guard against this.
This problem does not present itself in the original implementation because the code only calls initializeRefactoring()
from a selectionChange
event; it only calls it when the user hits OK.
Fixed in ef0265920f481c0edb904553ec79dae8745aeb0e
Finished up capturing the unavailable refactorings and writing the tests in 80d1faac4fcb4f04bb541fc46fbb1a31be213e02 .. 99566b9b3f225380c1e040adc0e8dd5fb5cf989a
Merged the branch "instrument-use-supertype" into "master" and closed the issue.
We need to capture performed, cancelled and unavailable events of this method. And, we need to write automated tests for our instrumentation of this refactoring.