Closed reprogrammer closed 13 years ago
Captured selected text offset and length within the code snippet as part of the refactoring in d47986bfa617cc2860d32d1970ee31e8a617ca66.
Generalized the code for logging unavailable extract interface in 8a0cb518e33c66b8691aa49b3ca036a7cdaacba2 and 358da10268d600348c001a60249fca86bfe35e04.
Captured detailed selections for unavailable extract super class refactoring in 62415d51a065419bb76dda5736b825df0917775a.
Captured more information for unavailable push down refactorings in 5d39f7df8066d9fc9009e37a1624f7e2b49f3178.
Captured more information for unavailable watched Java refactorings in 1edf8d3c5aa2c55dd9786b9dfbbba3176c422597.
Captured more information for an unavailable inline refactoring in 9233b02edf15564a9ad2627f4dce8b115ec81e11.
Capture more information about an unavailable rename Java element refactoring in a78e01f0331a9444df77e2b75653ce8dd7fb8fd3.
We have to think about a better place to clear the RefactoringGlobalStore
. I think the right place to clear this global data is after Logger
serializes the refactoring descriptor. Unfortunately, Logger
is in ltk.core where RefactoringGlobalStore
is not accessible because RefactoringGlobalStore
depends on jface. Currently, the placement of RefactoringGlobalStore.clearData
is error-prone and we are using ad-hoc caching of RefactoringGlobalStore
to prevent losing the global store before everyone is done with it. We need to refactor the architecture of RefactoringGlobalStore
to make it easier to understand and safer.
0300112b6c26002540ae03c6ca59807cf0f68c16 partially addresses the problem of safely clearing the RefactoringGlobalStore
. We need to create a new instance of RefactoringGlobalStore
in the run
methods of the action classes of refactorings to make sure that we clear up RefactoringGlobalStore
even if CodingSpectator does not serialize the refactoring descriptor.
The user has to select some elements to invoke a refactoring. These selections are important to capture as they tell us how users invoke refactorings in practice. For example, if the user fails to invoke a refactoring because the refactoring is not the available, it would be interesting to know from where the user has tried to initiate the refactoring.
The information that we currently capture about selections is limited. For example, for a performed/cancelled extract method refactoring, we capture the offsets of the selected text with respect to the whole document. But, we don't have the document unless we replay the changes using CodingTracker. Other examples are unavailable refactorings. If the user puts the cursor within an import statement (without selecting any text) and tries to invoke the extract interface refactoring, CodingSpectator reports the selection to be an empty string. An empty string doesn't tell us what element the user has actually selected and why the refactoring wasn't available in that position.
We need to capture more information about the selection to be able to interpret the user's action better. The following information about a selection will give us a good idea of how the user has invoked the refactoring.