I am trying to make the Dart plugin use the server for renaming a variable, as the IDEA part to fix https://github.com/dart-lang/sdk/issues/47521
The following points are noticed:
- The plugin doesn't call the server, but uses VariableInplaceRenamer (which extends InplaceRefactoring) and uses startTemplate() (in https://github.com/JetBrains/intellij-community/blob/eeac17a4041e0de49aabf848121b474ee17a0a03/platform/lang-impl/src/com/intellij/refactoring/rename/inplace/InplaceRefactoring.java#L371)
- DartServerRenameTest: calls the server 'edit.getRefactoring', but I couldn't trigger this from using the plugin as a user
- I see DartServerRenameHandler which implements RenameHandler.
My questions are:
- What does DartServerRenameTest test? Is it testing something not actually happening with the user?
- Is DartServerRenameHandler handling something else e.g. file edit? If yes, should we have 'RenamePsiElementProcessor' extension to handle such case?
- Any other hints
Thanks a lot.