-
由 David Poeschl 提交于
Fixes #540 "Stale rename entries in the lightbulb menu" Prior to this change, dismissed rename tracking sessions continued to provide codefixes which would silently fail when invoked, without completing the rename operation. With this change, we now do the following when rename tracking is manually dismissed: - Trigger the diagnostic service to reanalyze the document, thus removing the rename tracking diagnostic. - Stop providing a codefix when requested - Show a dialog if a cached codefix is invoked explaining that the rename was not performed. Here are the there user scenarios: 1. The user dismisses rename tracking - The lightbulb will continue to show in the margin, regardless of whether any codefix/refactoring is actually still available. 2. The user expands the lightbulb without it ever having been expanded before. - In this case, we are queried for fixes and will not return any, so either the lightbulb will disappear or it will contain other relevant codefixes/refactorings at that position, excluding rename. 3. The user expands the lightbulb after it was previously expanded. - Our fix was already cached, so we can only give a reasonable message when it is invoked. Once #885 is fixed, we can instead implement IDiagnosticUpdateSource and avoid forcing diagnostic reanalysis.
499a46f5