This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 269390 - Please show type of variable via ctrl + hover on variable
Summary: Please show type of variable via ctrl + hover on variable
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: PC Other
: P3 normal (vote)
Assignee: Tomas Mysik
Depends on:
Reported: 2016-12-19 10:08 UTC by Christian Lenz
Modified: 2016-12-19 10:15 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Christian Lenz 2016-12-19 10:08:44 UTC
When I hover over a variable in NetBeans I got the info about the variable, but if the veriable is an instance of an object, I can't see the type of the variable, only when I do a ctrl + space on the variable. In PHPStorm you got the type of the variable when you ctrl + hover on it.

Here is an example:

$model = new User_Models_Article($param1, $param2, $param3);

Output in NetBeans after Ctrl + hover $model:

VARIABLE: $model (ProductsController.php)

Output in PHPStorm after Ctrl + hover $model:

$model: User_Models_Article

So for NetBeans it would be nice to have this output:

VARIABLE: $model: User_Models_Article (ProductsController.php)

maybe the word VARIABLE could be removed, but I don't care.
Comment 1 Christian Lenz 2016-12-19 10:15:37 UTC
Such less information I got when I Ctrl + hover over the instanciation of User_Models_Article.


$model = new User_Models_Article($param1, $param2, $param3);

Output in PHPStorm while ctrl + hover User_Models_Article:

public function User_Models_Article($productId, $articleId, $language, $param=false, $otherParam=2): User_Models_Article

Output in NetBeans while ctrl + hover User_Models_Article:


PHPDoc not found

So what I would expect is this:


public function User_Models_Article($productId, $articleId, $language, $param=false, $otherParam=2): User_Models_Article

PHPDoc not found.

Or smth like that. I know that the information works better if I use PHPDoc, but often you have code that you share with other developers and you have no process to have documentation etc. So please implement such feature.