Closed BladeMF closed 3 years ago
Thank you for your notes and ideas! I appreciate your time with this.
Just so I am sure I understand your idea correctly, let me try to explain how it currently works and then we can get to me understanding your idea.
DefinitionLocator
to locate the definition using the current offsetReferenceFinder
to locate all the references at the current offsetWorkspaceEdit
object.While I agree that class moving should be somewhere in there, I have trouble seeing how we can use this architecture while using DefinitionLocator
, ReferenceFinder
because they currently implement the task of splitting between class, members variables and methods and variables.
Can you please elaborate more on how the above logic will go into three classes as it does not cite classes or members or variables with the exception of when deciding whether to rename the file. Do you want to reimplement the same reference finding logic in VariableRenamer
, ClassRenamer
and MethodRenamer
or am I misunderstanding you?
This one seems to be replaced by #24 ? Could it then be closed?
yes, this has been extracted and implemented in other PRs :)
I am creating this PR so we can discuss the code. It's not going to get any better if I wait longer :-)
The code works by using Find all references to find everything that can be renamed.
https://github.com/phpactor/phpactor/issues/1140