Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio "Open Declaration" like eclipse

Is there a function like the "open declaration" in eclipse, that we can use in the new Android Studio?

Just like F3 button.

like image 206
Rotem Avatar asked May 19 '13 08:05

Rotem


People also ask

How to go to declaration in Android Studio?

Press Ctrl + Shift + A , and search for the command you're looking for ("declaration") for example. This finds the command "Declaration - Goto by Reference action - Ctrl + B ".

How do I open the declaration view in Eclipse?

F3 — Jumps to include file or variable declaration/definition. If you want to use the mouse for this, press the Ctrl key and hover over the source with the mouse. Shortcut for Navigate > Open Declaration.


2 Answers

Here are more details to help you avoid asking the same question for all the other commands:

Press Ctrl + Shift + A, and search for the command you're looking for ("declaration") for example. This finds the command "Declaration - Goto by Reference action - Ctrl + B".

So you just need to put your cursor on the method you want to go to, and press Ctrl + B? You can also Ctrl + Click to achieve the same goal.

The most useful keyboard shortcuts are described in the Help - Tip of the day dialog box. Read them all.

like image 112
JB Nizet Avatar answered Oct 20 '22 04:10

JB Nizet


In IntelliJ-IDEA it's Right-Click => Go To => Declaration. As others noted, Android Studio is based on IntelliJ-IDEA and in most of the cases, the experience would be the same.

like image 21
Monir A Avatar answered Oct 20 '22 04:10

Monir A