简体   繁体   中英

How can I view the fully qualified name for an imported class

Is there a way I can see (in context) the fully qualified name for an imported class?

eg I've got this in the middle of a +200 lines php file:

$this->helper = new ObjectManager($this);

How can I see the full class name for ObjectManager (eg \\Framework\\Helper\\ObjectManager ) without scrolling to the top (where the use statements are), or navigating to the actual class definition (⌘+B or ⌘+Click)?

I've tried (Alt+Space) but that just displays the constructor definition. I've also tried hovering the cursor over the class and I've checked the top and bottom status bars for any hints. Couldn't find anything.

Thank you.

You can invoke View | Quick Documentation View | Quick Documentation ( Ctrl + Q on Windows using Default keymap) and it will tell you general class info: what interfaces it implements, class description (from PHPDoc if present), what namespace it is etc.

An example for one of the classes from Laravel 5.4 framework:

在此处输入图片说明


You can also try invoking code completion popup ( Ctrl + Space here) with caret placed somewhere close to the end of the class name (so it precisely matches the class) -- it will show what namespace it's from:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM