Closed reprogrammer closed 13 years ago
RefactoringWizard
has multiple RefactoringWizardPage
s. If the refactoring is wizard based it's part of RefactoringWizardDialog
and if it's dialog based it's part of RefactoringWizardDialog2
. All of the refactorings that we've documented so far such as extract/inline and move are dialog based. So, we'll first go for instrumenting dialog based refactorings.
Wizard
has a list of its pages in a list called pages
. The default implementation of getNextPage()
returns the next page in this list and returns null if there no unvisited pages left.
We think RefactoringWizardDialog2.showCurrentPage()
is a good place to begin the timing of viewing a page. However, we noticed that the first time the refactoring dialog appears, RefactoringWizardDialog2.showCurrentPage()
doesn't get invoked. We think the call dialog.open()
in RefactoringWizardOpenOperation
initiates the opening of the dialog. The call to dialog.open()
is blocking. So, we have to begin the timing before this call.
We found that RefactoringWizardDialog2.makeVisible()
is a better place to record the time of showing a page, because it gets called both the first time the dialog is shown and when the user navigates through the pages. However, it doesn't get invoked when the user navigates to an error page.To capture when the error dialog opens or closes, we can instrument RefactoringWizardDialog2.showErrorDialog()
.
We think that it might be just easier to record the time every navigation button (OK, CANCEL, PREVIEW, FINISH, CONTINUE) on any page or dialog is pressed. RefactoringWizardDialog2
and RefactoringStatusDialog
have methods that get invoked when such buttons get pressed.
To store the time in the refactoring descriptor, we have to augment the descriptors created by the refactoring objects. But, we don't want to modify the creation of refactoring descriptors in every refactoring class. Therefore, we'd prefer to get an existing refactoring descriptor and add some information to it. However, the RefactoringDescriptor
class doesn't support such augmentations. JavaRefactoringDescriptor
has a map of arguments. But, we cannot access this class from LTK. Our proposal for solving this is to provide a method such as cloneByAugmenting
in the refactoring descriptor class hierarchy that would add some items to the arguments
map of the existing refactoring descriptor and construct a new descriptor out of it.
Resolved in 06532a0b637fc36a43ea94fea46d3f98aba20088 .. 5adf343b769544bd30a4e993915e8002b79c66dc.
First working prototype at 8b8ec1af74ad050f3cf6b47e9488b304eb0b1947
performFinish
and performCancel
of RefactoringWizard
. We investigated the possibility of doing all of the timing instrumentations in RefactoringWizardDialog2
.IWizardPage#getName()
is more descriptive than IWizardPage#getTitle()
.IDialogConstants
.Performed the above three changes in 2c8e61e48044d5b4c2ee628a57c046bdd0e35440.
Updated change markers in f65820ca9f5edcb46174d653c482a6c9e261884b.
Merged (fast-forward) into master.
We need to record an event when the user asks for help on a refactoring wizard. This event is interesting because it could signal the users' problem with the refactoring user interface.
630fccf0bb363bd9c74ba585093745444327d1cf added org.eclipse.jdt.core.manipulation
to the deployment configuration files.
Updated the license in eb803c0ab3f266f55676510e968e3e7d1f2937f1.
Mohsen and I tried overriding org.eclipse.jface.wizard.WizardDialog.helpPressed()
in org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog
, but, it didn't capture the help button presses. So, we decided not to capture invocations of help pages on refactoring wizards.
Currently, CodingSpectator just records the timestamp of the invocation of a refactoring. To identify the complicated and problematic steps of a refactoring, it needs to capture the time users spend on each step.