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

Revise the use of Refresh in RenameProvider

Offen
#249 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
backlog
Vorherrschende Sprache
Scala
Sterne
12
Forks
3
Ø Merge
13 Std. 43 Min.
Gemergte PRs (30 T.)
19

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.