Symptom: Fix all not available when providing more than one code fix
User scenario: A CodeFixProvider that supports fix all occurrences code fix, gets FixAll support in IDE if it registers a single code action, but disappears as soon as fixer registers multiple code actions. Reason: A CodeFixProvider that intends to support fix all occurrences must classify the registered code actions into equivalence classes by assigning it an explicit, non-null equivalence key which is unique across all registered code actions by this fixer. This enables the FixAllProvider to fix all diagnostics in the required scope by applying code actions from this fixer that are in the equivalence class of the trigger code action. The analyzer added by this change catches violations of this requirement in the code actions registered by a CodeFixProvider that supports FixAllProvider. Fixes #2864
Showing
想要评论请 注册 或 登录