angular-docs-cn/packages/language-service/ivy
Andrew Scott 402e2e6189 refactor(language-service): de-duplicate rename and reference results (#40454)
The initial implementation assumed that the consuming editors would
de-duplicate rename locations. In fact, vscode treats overlapping rename
locations as distinct and errors when trying to preview the renames.

This commit updates the language service to de-duplicate exact file+span
matches before returning rename and reference locations.

While vscode _does_ de-duplicate reference results, it still makes sense
to de-duplicate them on our side when possible to make tests more
understandable. If a template has 3 instances of a variable, it makes
sense to get get 3 reference results rather than 4+ with some duplicates.

PR Close #40454
2021-01-19 14:21:15 -08:00
..
test refactor(language-service): de-duplicate rename and reference results (#40454) 2021-01-19 14:21:15 -08:00
BUILD.bazel fix(language-service): include compilerOptions.rootDir in rootDirs (#40243) 2021-01-06 10:54:11 -08:00
adapters.ts fix(language-service): LSParseConfigHost.resolve should not concat abs paths (#40242) 2021-01-06 10:54:40 -08:00
attribute_completions.ts feat(language-service): completions for structural directives (#40032) 2020-12-14 12:08:41 -08:00
compiler_factory.ts fix(compiler-cli): track poisoned scopes with a flag (#39923) 2020-12-03 13:42:13 -08:00
completions.ts fix(language-service): Support completions of two-way bindings (#40185) 2021-01-07 13:18:38 -08:00
definitions.ts fix(language-service): fix go to definition for template variables and references (#40455) 2021-01-19 13:03:14 -08:00
display_parts.ts feat(language-service): complete attributes on elements (#40032) 2020-12-14 12:08:41 -08:00
language_service.ts feat(language-service): Implement `getRenameInfo` (#40439) 2021-01-15 16:44:30 -08:00
quick_info.ts refactor(compiler-cli): Enable pipe information when checkTypeOfPipes=false (#39555) 2020-12-11 16:19:15 -08:00
references.ts refactor(language-service): de-duplicate rename and reference results (#40454) 2021-01-19 14:21:15 -08:00
template_target.ts refactor(language-service): Have TemplateTarget recognize two way bindings (#40185) 2021-01-07 13:18:38 -08:00
ts_plugin.ts feat(language-service): Implement `getRenameInfo` (#40439) 2021-01-15 16:44:30 -08:00
ts_utils.ts fix(language-service): Do not include $event parameter in reference results (#40158) 2021-01-05 10:07:20 -08:00
utils.ts fix(language-service): fix go to definition for template variables and references (#40455) 2021-01-19 13:03:14 -08:00