angular-docs-cn/packages/language-service/ivy
Andrew Scott 06a782a2e3 feat(language-service): Add "find references" capability to Ivy integrated LS (#39768)
This commit adds "find references" functionality to the Ivy integrated
language service. The basic approach is as follows:

1. Generate shims for all files to ensure we find references in shims
throughout the entire program
2. Determine if the position for the reference request is within a
template.
  * Yes, it is in a template: Find which node in the template AST the
  position refers to. Then find the position in the shim file for that
  template node. Pass the shim file and position in the shim file along
  to step 3.
  * No, the request for references was made outside a template: Forward
  the file and position to step 3.
3. (`getReferencesAtTypescriptPosition`): Call the native TypeScript LS
`getReferencesAtPosition`. For each reference that is in a shim file, map those
back to a template location, otherwise return it as-is.

PR Close #39768
2020-12-02 12:54:21 -08:00
..
test feat(language-service): Add "find references" capability to Ivy integrated LS (#39768) 2020-12-02 12:54:21 -08:00
BUILD.bazel refactor(compiler-cli): provide a host to readConfiguration (#39619) 2020-11-17 14:45:09 -08:00
adapters.ts refactor(language-service): language_service_adapter -> adapters (#39619) 2020-11-17 14:45:09 -08:00
compiler_factory.ts refactor(language-service): language_service_adapter -> adapters (#39619) 2020-11-17 14:45:09 -08:00
definitions.ts refactor(compiler-cli): Add additional shim locations to reference and variable symbols (#39715) 2020-11-19 12:15:21 -08:00
display_parts.ts refactor(compiler-cli): Add additional shim locations to reference and variable symbols (#39715) 2020-11-19 12:15:21 -08:00
language_service.ts feat(language-service): Add "find references" capability to Ivy integrated LS (#39768) 2020-12-02 12:54:21 -08:00
quick_info.ts refactor(compiler-cli): Add additional shim locations to reference and variable symbols (#39715) 2020-11-19 12:15:21 -08:00
references.ts feat(language-service): Add "find references" capability to Ivy integrated LS (#39768) 2020-12-02 12:54:21 -08:00
template_target.ts feat(language-service): Add "find references" capability to Ivy integrated LS (#39768) 2020-12-02 12:54:21 -08:00
ts_plugin.ts feat(language-service): Add "find references" capability to Ivy integrated LS (#39768) 2020-12-02 12:54:21 -08:00
ts_utils.ts refactor(language-service): Use compiler APIs in Ivy to get definitions for external resources (#39476) 2020-11-06 09:17:33 -08:00
utils.ts feat(language-service): Add "find references" capability to Ivy integrated LS (#39768) 2020-12-02 12:54:21 -08:00