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.
Today I ran to a strange behavior in Code suggestion. Repeat steps: 1)Create empty PHP project or use any existing 2)Create new PHP file 3)Paste following code into editor and save it. ------snip------------------- <?php class test { function __construct() { } public function start($param) { $aa = $this->loadclass1(); $aa->; $bb = $this->loadclass2(); $bb->; } /** * @return ClassName */ private function loadclass1() { return new ClassName(); } private function loadclass2() { return new ClassName; } } class ClassName { function aa() {} function bb() {} function cc() {} } ------snip------------------- 4) Goto line 11 at statement $aa-> (or line 14 at $bb->) 5) Try to invoke code completer;it says "No suggestion" 5a) If code completion works, try to add an empty line anywhere and do 5) again, until it says "No suggestion" 6)Now try remove ctor function (or comment it out, or even rename it to something else, eq. __constructer ) 7)Do 5) again, and now it works as expected 8)restore ctor, and try 5); again "No suggestion" Version tested: OK Product Version: NetBeans IDE 6.9 (Build 201006101454) Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15 System: Windows Vista version 6.1 running on x86; Cp1250; cs_CZ (nb) OK Product Version: NetBeans IDE 6.9.1 (Build 201007282301) Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15 System: Windows Vista version 6.1 running on x86; Cp1250; cs_CZ (nb) OK Product Version: NetBeans IDE 7.0 Beta (Build 201011152355) Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15 System: Windows Vista version 6.1 running on x86; Cp1250; cs_CZ (nb) OK Product Version: NetBeans IDE Dev (Build 2010-09-06_21-44-04 ) Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15 System: Windows Vista version 6.1 running on x86; Cp1250; cs_CZ (nb) Userdir: C:\Users\zradek\.netbeans\dev FAIL Product Version: NetBeans IDE Dev (Build 2011-01-13_03-03-33 ) Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15 System: Windows Vista version 6.1 running on x86; Cp1250; cs_CZ (nb)
Reproducible, even the $aa is not visible in cc, when the constructor is there.
It's regression => increase the priority P2
Fixed in webmain.