| Summary: | [refactoring] enhance Javadoc of RefactoringWizard.performFinish() (was: Refactoring wizard remains open with enabled buttons after refactoring operation completes) | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Paul Slauenwhite <paulslau> |
| Component: | UI | Assignee: | Markus Keller <markus.kell.r> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | trivial | ||
| Priority: | P3 | CC: | bokowski, daniel_megert, markus.kell.r, pwebster |
| Version: | 3.5 | ||
| Target Milestone: | 3.6 M1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Note, the Next/Finish/Cancel buttons are re-enabled when the Finish button is clicked on the first page of the refactoring wizard and the Back/Finish/Cancel buttons are re-enabled when the Finish button is clicked on the second/last page of the refactoring wizard. There's little we can do against that. RefactoringWizard#performFinish() needs to restore the enablement of the buttons. E.g. when Finish has been pressed and the the refactoring is canceled, the enablement must be right in the end. Refactorings should implement all their processing in Change objects, and if they do, then this is not an issue any more. Clients are not expected to extend RefactoringWizard#performFinish() to do lengthy processing there. (In reply to comment #2) > There's little we can do against that. RefactoringWizard#performFinish() needs > to restore the enablement of the buttons. E.g. when Finish has been pressed and > the the refactoring is canceled, the enablement must be right in the end. > > Refactorings should implement all their processing in Change objects, and if > they do, then this is not an issue any more. Clients are not expected to extend > RefactoringWizard#performFinish() to do lengthy processing there. > Thanks Markus. Since this is a public API, can we add a method JavaDoc with the above content? > Since this is a public API, can we add a method JavaDoc with the above content?
Sure, I've released that to HEAD.
Verified in I20090805-1800. Closing. |
Refactoring wizard remains open with enabled buttons after refactoring operation completes. When an extension of the org.eclipse.ltk.ui.refactoring.RefactoringWizard performs steps after the call to org.eclipse.ltk.ui.refactoring.RefactoringWizard.performFinish() in the <subclass>.performFinish() method, the refactoring wizard remains open with the Finish/Next buttons enabled until the <subclass>.performFinish() method terminates. Steps to reproduce: 1) Create a extension of the org.eclipse.ltk.ui.refactoring.RefactoringWizard. 2) In the <subclass>.performFinish() method, call org.eclipse.ltk.ui.refactoring.RefactoringWizard.performFinish() and then: try { Thread.sleep(5000); } catch (Exception e) { e.printStackTrace(); } 3) Open the refactoring wizard and finish the operation (click Finish). 4) Note the Next/Finish buttons remain disabled until the refactoring operation terminates and then enable for the 5 second sleep before the refactoring wizard is closed.