Whenever I refactor Kotlin code in Android Studio ...
# getting-started
l
Whenever I refactor Kotlin code in Android Studio and I get an automatic suggestion to rename some class properties, the suggested names all start with
m
in the old Java naming convention:
mSomeProperty
. Can I configure it somewhere that Kotlin refactoring doesn't use (obsolete) Java naming conventions?
In
Editor -> Code Style -> Kotlin
I don't see such a setting, only in
Code Style -> Java -> Code Generation
. I assume Kotlin takes it's settings for code generation for refactoring from there as well.
s
I have never encountered this suggestion. I assume your Java Style is custom made? Not that it should make a difference to Kotlin. As someone who has no knowledge of how refactoring is implemented, it seems buggy should the Kotlin refactoring rely on Java style 🤔
l
I don't have any custom Java style, nor have any Java code in project. It is 100% Kotlin. But everytime I rename a class, and there are instances of this class in other Kotlin files/classes (as members), the suggestion pops up to rename these members as well starting with the
m
prefix.
🤯 1