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 162982

Summary: No code completion for built-in functions after enabling modules by ergonomics
Product: editor Reporter: menic <menic>
Component: CSL (API & infrastructure)Assignee: Vitezslav Stejskal <vstejskal>
Severity: blocker CC: emononen, fzamboj, mmirilovic, msauer, pjiricka, rmatous, tmysik, tslota
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Attachments: message.log
example class
NOT PATCH, JUST HINT - simply these changes (omitting caches) fixes the problem

Description menic 2009-04-17 20:40:12 UTC
I have notice that in development versions of nb from hudson cc for php functions has lost. Also if I ctrl+click on php
functions nothing happens.
Comment 1 rmatous 2009-05-19 13:53:58 UTC
still not working for you?

wORKS FOR ME, Filip, can you test
Comment 2 menic 2009-05-19 16:15:20 UTC
somehow i fixed it, but now problem returns. I think it is a problem with netbeans user profile.
Comment 3 rmatous 2009-05-19 17:01:01 UTC
return? What does it mean? After downloading/using new dev builds or 6.7build. Or just starting with fresh userdir?
Which build do you use? 100% reproducibel == simply doesn't work, or just sometimes?

Thanks for your comments!
Comment 4 menic 2009-05-19 17:25:35 UTC
Currently I am using todays relase and CC for php functions does not work. 
I can send you a log if you want to...
Comment 5 rmatous 2009-05-19 18:24:17 UTC
ok, send me log and could you send me the url link to todays release to be sure and also steps how to reproduce, thanks
Comment 6 rmatous 2009-05-21 16:53:34 UTC
still not working? any details?
Comment 7 menic 2009-05-21 17:01:00 UTC
I have attached a message.log
Comment 8 menic 2009-05-21 17:01:34 UTC
Created attachment 82572 [details]
Comment 9 Filip Zamboj 2009-05-21 17:15:07 UTC
Product Version: NetBeans IDE Dev (Build 200905210201) - downloaded from smetiste.czech 
Java: 1.6.0_13; Java HotSpot(TM) 64-Bit Server VM 11.3-b02

well, I maybe reproduced. Radek, please evaluate if it is really not working as expected: 

1. create new php file in new php project  
2. press ctrl+space for php (between <? ?>)
3. it doesn't offer any functions  << PROBLEM 1 
4. create function <? function myFunction() {return "OK";} ?> 
5. invoke cc after function declaration 
6. myFunction is not offered after ctrl+space   << PROBLEM 2

Comment 10 rmatous 2009-05-22 10:00:25 UTC
Tested with "fresh userdir", followed your steps and works for me as expected (no problem found):
Build: NetBeans IDE Dev (Build 200905210201) (taken just php build)
Java: 1.5.0_16; Java HotSpot(TM) Client VM 1.5.0_16-b02; Sun Microsystems Inc.

I can try with jdk 1.6 also. 

Filip, can you reproduce with fresh userdir?
Comment 11 rmatous 2009-05-22 10:33:16 UTC
Also not reproducible on: 
Product Version         = NetBeans IDE Dev (Build 200905210201)
Operating System        = Linux version 2.6.24-24-generic running on i386
Java; VM; Vendor        = 1.6.0_07; Java HotSpot(TM) Client VM 10.0-b23; Sun Microsystems Inc.
Runtime                 = Java(TM) SE Runtime Environment 1.6.0_07-b06ducible 
Comment 12 rmatous 2009-05-22 11:10:37 UTC
Also not reproducible(php only):
Product Version         = NetBeans IDE Dev (Build 200905210201)
Operating System        = Linux version 2.6.24-24-generic running on i386
Java; VM; Vendor        = 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02; Sun Microsystems Inc.
Runtime                 = Java(TM) SE Runtime Environment 1.6.0_13-b03
Java Home               = /usr/lib/jvm/jdk1.6.0_13/jre

also not reproducible:
with full IDE 
Comment 13 rmatous 2009-05-22 11:20:03 UTC
Probably RANDOM, if so I would suspect this to be infrastructure (indexing) bug rather than php bug.

Please, evaluate, might happen that there are similar reports from other teams, anyway easily reassign back 
Comment 14 rmatous 2009-05-22 11:44:04 UTC
I can reproduce now with full IDE, so I'll strive to investigate deeply
Comment 15 rmatous 2009-05-22 11:57:20 UTC
The problem occures after first start when php is activated (enabled) - features on demand in action. After rebooting it
everything works fine.
Comment 16 rmatous 2009-05-22 12:23:06 UTC
-not reproducible on php-only build
-reproducible with Feature On Demanand

will investigate, P2 for now (seems to be very unpleasant bug)
Comment 17 Filip Zamboj 2009-05-22 12:41:38 UTC
Product Version: NetBeans IDE Dev (Build 200905220201)
Java: 1.6.0_13; Java HotSpot(TM) 64-Bit Server VM 11.3-b02

it's daily build from smetiste.czech 

1. cc doesn't offer php function 
2. doesn't offer method's of classes inside class 
3. no suggestions in case like this 
class A() {
  public function _construct() {}
$class = new <- press ctrl + space => no suggestions 
4. no offering class variables 
class A() {
  var $conn; 
  public function _construct() {
        $this-> ctrl+space => no suggestion 

@radek: you need some logging for this as well? I can send you project I used for testing. 

It's P1 to be fixed to 67. 
Comment 18 Filip Zamboj 2009-05-22 13:37:35 UTC
reproduced in RUBY in 
Product Version: NetBeans IDE Dev (Build 200905220201)
Java: 1.6.0_13; Java HotSpot(TM) 64-Bit Server VM 11.3-b02

looks like not PHP specific problem. CC works after IDE restart. 
Comment 19 rmatous 2009-05-22 15:57:57 UTC
I really don't expect to be php specific bug. 

If its reproducible also on Ruby then reassigning to CSL (I would guess Features on demand is in game) for better
Comment 20 Vitezslav Stejskal 2009-05-22 16:27:35 UTC
"I can send you project I used for testing." - yes please attach the project here.
Comment 21 Filip Zamboj 2009-05-22 16:35:50 UTC
I am attaching just one class here ... project has more than allowed post size here. 

go to line 225, for example, and write $this-> then press ctrl+space and you get no suggestions what's not correct. i
send you project by email. 

Comment 22 Filip Zamboj 2009-05-22 16:43:08 UTC
Created attachment 82666 [details]
example class
Comment 23 rmatous 2009-05-22 18:13:35 UTC
Created attachment 82670 [details]
NOT PATCH, JUST HINT - simply these changes (omitting caches) fixes the problem
Comment 24 Vitezslav Stejskal 2009-05-22 18:54:00 UTC
Thanks Radku for analyzing this.
Comment 25 David Strupl 2009-05-23 11:40:28 UTC
This is not P1, definitely not a showstopper for RC1, maybe for FCS. Making it back to P2 status.

I hope that everyone realizes that a workaround exists - restart the IDE (if I read all the comments correctly). BTW is
it true that after restart or without ergonomics this works ok in both PHP and Ruby?
Comment 26 rmatous 2009-05-23 15:24:40 UTC
I think David you understand it right. 

From my point of view this is showstopper for FCS. I cannot imagine to release 6.7 with this bug.

1. the first impression is that no editor features work for ruby, php (this first start then will often be the last one)
2. that majority of people according statistics use full (now ergonomics) IDE  
Comment 27 rmatous 2009-05-23 15:32:48 UTC
BTW: I cannot reproduce on Build 200905161401 but on Build 200905210201 its 100% reproducible for me.

Shouldn't be so difficult to find the cause because its 100% reproducible and seems to be last moment regression 
Comment 28 Marian Mirilovic 2009-05-23 21:31:21 UTC
I agree with Radek - back to P1 - stopper for FCS
Comment 29 Vitezslav Stejskal 2009-05-25 15:39:35 UTC
It should work now, please test and let me know.
Comment 30 Filip Zamboj 2009-05-26 14:08:51 UTC
I'll verify once this is in main. I didn't reproduce this in web-main before but did in main. However, if you ensure me
there is no difference for this bug I'll verify from jet-main. 

Comment 31 Marian Mirilovic 2009-05-26 14:41:16 UTC
wait for a fix into NB 6.7 
Comment 32 Marian Mirilovic 2009-05-26 14:47:45 UTC
could you please verify in the build from jet-main ?
... thanks in advance.
Comment 33 Filip Zamboj 2009-05-26 15:39:43 UTC
verified in provided build! please integrate into 67RC1 
Comment 34 Filip Zamboj 2009-05-26 15:40:32 UTC
btw, I'll mark as verified once it's verified in RC1 build 
Comment 35 Quality Engineering 2009-05-27 07:29:10 UTC
Integrated into 'main-golden', will be available in build *200905270201* on (upload may still be in progress)
User: Vita Stejskal <>
Log: #162982 - register separate PathRecognizer for each language so that adding/removing languages (FoD) in the IDE correctly refreshes the classpath ids cache
Comment 36 Max Sauer 2009-05-27 13:39:40 UTC
Patch reviewed.
Comment 37 Vitezslav Stejskal 2009-05-27 13:45:05 UTC
Thanks. Transplanted to release67 as
Comment 38 Filip Zamboj 2009-05-27 15:52:49 UTC
verified in release67 clone, changeset:   665c1089cf53 

Comment 39 phpjoel 2009-08-02 22:05:57 UTC
posted here: as born2code

PHP code completion / documentation works fine when creating a new document.  Does not work when opening a file from FTP 

Uninstalled 6.5 again today - installed 6.7.1.  Chose to import old settings.

Opened file for editing from FTP.  No code completion or documentation while inside the name of a PHP function.
Opened a "Recent File".  Same issue. (strlen, html_entity_decode, etc.).
Opened a php file from hard drive (File -> Open..) Same issue.
Created new project, typed in htm - hit CTRL+SPACE, proper listing and documentation displayed.

Should show possible functions & documentation depending on where cursor is.
Comment 40 Vitezslav Stejskal 2009-08-05 15:01:27 UTC
phpjoel, please file a new defect in the php/editor category. This issue is different and was fixed in 6.7. Thanks