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 207473 - code completion does not work anymore in 7.1
Summary: code completion does not work anymore in 7.1
Status: REOPENED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal with 2 votes (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-18 16:24 UTC by feeela
Modified: 2012-03-26 18:10 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Example PHP script (178 bytes, application/octet-stream)
2012-03-26 17:12 UTC, pada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description feeela 2012-01-18 16:24:34 UTC
The code completion feature (CTRL+space) does not work properly anymore in Netbeans 7.1.

I recognized that in a PHP project, code completion works for user-defined functions and variables, but not for standard PHP functions/classes.

After searching the web it seems that this is an overall problem in Netbeans 7.1, affecting also code completion in Java and HTML.

See also the following forum-posts:

"Code completion in jsp files not working properly in Netbeans 7.1"
http://forums.netbeans.org/viewtopic.php?t=46071

"HTML code completion lost after migration from 6.9.1 to 7.1"
http://forums.netbeans.org/viewtopic.php?t=46029

"Code completion for php in netbeans 7.1"
http://forums.netbeans.org/viewtopic.php?t=46002

"code completion java"
http://forums.netbeans.org/viewtopic.php?t=45920
Comment 1 Ondrej Brejla 2012-01-25 10:48:10 UTC
I don't see anything somehow connected with PHP. 3 cases are java/html-like...one is PHP but without reproducible test case.

Provide some reproducible test case in PHP and then reopen. Thanks.
Comment 2 matthias42 2012-02-15 20:20:24 UTC
Hey, I was one of the forum posters - I would have sworn, that it worked in the past, but testing again I failed. So please excuse the noise so far.

So question remains: Could a code completion be realized, that works by assuming a default version or that produces a code completion for all supported php versions?

I changed the bug type to ENHANCEMENT and returned priority to default P3 and reopened it - this should reflect the situation better. Feel free to close this, if you disagree!
Comment 3 feeela 2012-02-15 20:43:04 UTC
@obrejla: It seems, that the code completion not working has something to do with caching within Netbeans.

Workaround: If I delete the whole cache-folder BEFORE launching Netbeans, the code completion works until I restart Netbeans. I need to "rm -rf ~/.netbeans/7.1/var/cache/" every time before opening Netbeans. I've used Netbeans 7.0.1 and 7.1 in the last few weeks and had the problem in both versions. I didn't have those problem on my Laptop, running Netbeans 6.9.
Comment 4 leopard2av 2012-02-17 12:54:17 UTC
Same for the Java editor. 

For example:

I have 2 clases: UsuarioKey.java and Usuario.

Then i write Us->ctrl+space and show only the class 'Usuario', i write the entire name 'UsuarioKey' and the editor don't recognize, then i use alt+shift+f to auto import and UsuarioKey still unrecognized, i need to import the class manually.

It happens whith any class called the same way: Persona and PersonaKey; Documento and DocumentoKey... etc.

I'll switch back to 7.0.1
Comment 5 leopard2av 2012-02-17 12:55:41 UTC
Same for the Java editor. 

For example:

I have 2 clases: UsuarioKey.java and Usuario.

Then i write Us->ctrl+space and show only the class 'Usuario', i write the entire name 'UsuarioKey' and the editor don't recognize, then i use alt+shift+f to auto import and UsuarioKey still unrecognized, i need to import the class manually.

It happens whith any class called the same way: Persona and PersonaKey; Documento and DocumentoKey... etc.

I'll switch back to 7.0.1
Comment 6 pada 2012-03-26 17:12:55 UTC
Created attachment 117279 [details]
Example PHP script

PHP auto completion & "Go to Declaration" only works for the classes/files included in PHP and not for the user written files/libraries.

Currently Netbeans 7.1's auto completion does no show anything for either my class, functions or variables that I'm using in that example PHP script. The Go to Declaration does not work for my example PHP script either.

So PHP would be able to auto complete (ctrl+space) 'mysql_', but not 'MyTest'.

I have already deleted the /var/cache folder and it did not change anything.
Comment 7 pada 2012-03-26 18:10:29 UTC
I've just downloaded and installed Netbeans 7.1.1 and PHP auto completion and Go to Declaration works again!