press Alt-Enter on a parameter and use “Convert to...
# intellij
y
press Alt-Enter on a parameter and use “Convert to receiver” option, or use the Change Signature refactoring and mark a parameter as receiver