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.
Product Version: NetBeans IDE Dev (Build 2009-05-07_15-04-00 ) Java: 1.6.0_13; Java HotSpot(TM) 64-Bit Server VM 11.3-b02 description: autocomplete using specification variable type using tag @var in PHPDoc syntax consider: /** @var ArrayObject a */ $a->getIterator(); result: no cc for $a-> expected result: offers cc for object of ArrayObject class
*** Issue 164697 has been marked as a duplicate of this issue. ***
This syntax is supported: /* @var $a ArrayObject */ and not: /** @var ArrayObject a */
(In reply to comment #2) > This syntax is supported: > /* @var $a ArrayObject */ > > and not: > /** @var ArrayObject a */ I finally figured this out just recently. When documenting a class property, one must use the standard PHPdoc syntax: /** @var type $variable */ but when documenting a standard variable, one must use a NB-specific syntax: /* @var $variable type */ If you add the second * to the opening bit, add a description, or switch the order of the variable name and type, it breaks. No wonder there's so much confusion over this! Why this odd syntax that's incompatible with standard PHPdoc syntax?