apex-dev-tools / apex-dev-tools/apex-ls

Revise the use of Refresh in RenameProvider

Aperta
#249 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
backlog
Lingua principale
Scala
Stelle
12
Fork
3
Merge medio
13h 43m
PR unite (30g)
19

Descrizione

The rename provider currently calls `refresh` in `getClassBodyDeclaration` method. This is done to correctly resolve dependency holders. When this call is not in place, the list of dependency holders returned from calling getDependencyHolders on a declaration is incomplete.
For example: a function is defined and used in Class A but also used in Class B. If the user tries to rename the function from its **usage** (a callout) in class A - when getDependencyHolders is called on the declaration, it will not return the class body declaration from Class B as a dependency. As a result only instances in Class A are returned.
This is easiest to reproduce the first time you call rename after launching vscode. Subsequent attempts may behave correctly so it's important to make sure the first attempt works.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.