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 7.3 RC2 (Build 201302050851) Operating System = Linux version 3.2.0-38-generic running on amd64 Java; VM; Vendor = 1.7.0_13 Runtime = Java HotSpot(TM) 64-Bit Server VM 23.7-b01 If I add PHP Doc to class field Code Complete does not show methods and fields of specified class. (See example) But instead it shows these suggestions for local variable of any method if it has the same name Also I can't use "vdoc + Tab" shortcut to paste code Template before field definition /* @var $odb SomeClass */ private static $odb; public function test() { self::$odb->... // here should be suggestion with public methods and fields of SomeClass $odb->... // unexpectedly we have SomeClass methods shown for this variable }
Possibly duplicate of issue 226071?
VDoc can't be used before class field. You have to use common PHPDoc format /** @var SomeClass */ You see...2 asterisks and without field name. > $odb->... // unexpectedly we have SomeClass methods shown for this variable That's because VDoc creates a virtual declaration of $odb variable. So as I wrote, don't use VDoc where common PHPDoc must be used. VDoc is just for use in a "code"...I think inside method bodies, cycles and such. If you use this, everything works properely in 7.3: <?php class SomeClass { function someFoo() {} } class Test { /** @var SomeClass */ private static $odb; function testStatic() { self::$odb-> //CC works here $odb-> //CC doesn't work here } } ?> Product Version: NetBeans IDE 7.3 (Build 201302132200) Java: 1.6.0_34; Java HotSpot(TM) Client VM 20.9-b04 Runtime: Java(TM) SE Runtime Environment 1.6.0_34-b04 System: Linux version 3.5.0-23-generic running on i386; UTF-8; cs_CZ (nb)