Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a keyboard shortcut in Eclipse for "open declaration in layout"?

I hate when I try to open the declaration of a layout and Eclipse redirects me to the R file, which is the same as nothing. Is there a keyboard shortcut for it to take me to the layout file. I know if you click on it with CTRL it gives you this option on a pop-up, but I hate using the mouse. I can't find this on the keybinding section. There's just plain "open declaration" which I have already changed because it was a horrible F3 by default, but this usually takes you to the R file

like image 425
Thiago Avatar asked Oct 21 '22 03:10

Thiago


1 Answers

Well there is a mouse shortcut - Just hold down CTRL and hover over the id you want to see. You'll get two options, one for R.java and other to open the declaration. Choose the second one

EDIT:

Sorry, completely missed the part where you dont like the mouse use. Well I dont think there is any other way, and I see a bug/feature request here https://code.google.com/p/android/issues/detail?id=53536 reported specifically asking for this, so I wouldnt think another way exists other than either using the mouse or using the keyboard to highlight the particular item of interest and using Ctrl+Shift+R to get the menu and pressing Enter but like you mention this wouldnt work for something like R.id.foo . Wish someone from Google/Eclipse could comment on the bug/feature request.

like image 102
Vrashabh Irde Avatar answered Oct 29 '22 13:10

Vrashabh Irde