How to add these two functions to android studio, to turn a existing (not accessible) variable into a private/public? The screenshot is faked and not real, but it is the aim of my question.
To turn a local variable into private/public I have to do the following steps:
- Cut [variable-class] [variable-name]
- Write [private/public]
- Change cursor position to class-head
- Paste [variable-class] [variable-name]
- Copy [variable-name]
- Change cursor position to class-method
- Paste [variable-name]
Ctrl+Alt+F will extract your local variable into the class field.
To learn other available refactorings, you can read the Intellij Idea Reference Card.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With