and 12 levels deep into #basicRenameClass:
we have...

NautilusRefactoring>>internalPerformRefactorings:
    ...
    (ChangesBrowser changes: aCollectionRefactoring) openWithSpec

which forks such that execution returns to perform the #changed: before you get a chance to click the <Ok> button.

I do not understand why the fork is needed. The author of nautilus was sometimes to prompt at using fork.
Did you see if the behavior is acceptable when we remove the fork?
So the problem is how to make it pause at #basicRenameClass: until the ChangesBrowser is closed (either ok cancel), such that #changed: is not executed before the changes are applied. The complication is the existing code operating on the ChangesBrowser <Ok> button, and the stack distance of #internalPerformRefactorings: from #renameClass.

I am thinking of some synchronisation like the following would be least impact...

NautilusRefactoring>>internalPerformRefactorings:
    ...
    (ChangesBrowser changes: aCollectionRefactoring)
openDialogWithSpec windowClosedAction: [ refactoringDoneSemaphore signal].
    refactoringDoneSemaphore wait.

or maybe that could be pushed into SpecDialogWindow as a convenience method available to others.

cheers -ben


Reply via email to