android-studiocopy-paste

Is there a shortcut in Android Studio to get the full path of a variable or method?


I'm looking for a way to copy the full path of any variable.

The expected result is to have this value in the clipboard:

com.myproject.Class1#variable1

Solution

  • You can use Copy Reference to get this:

    com.myproject.Class1#getVariable1
    

    When the cursor is placed over a variable you can access it via the context menu's Copy / Paste Special entry or simply use the shortcut Ctrl+Alt+Shift+C.

    I think that's the best you can get.