问题
I'm using Netbeans 6.9.1, everything was just fine however suddenly, it has stopped detecting any changes made to the code, e.g new variables, functions, etc. If I try to refactor/rename a variable, e.g by pressing CTRL + R, it says 'Refactoring not available in this context'.
Its in a PHP project if that matters.
Any ideas?
回答1:
Apparently deleting the contents of .netbeans/var/cache/index in your user directory (application data on windows etc) fixed it.
回答2:
Since NetBeans 7.2 the cachedir has been moved to the following locations:
C:\Users\<username>\AppData\Local\NetBeans\Cache\7.2\
on Windows
/Users/<username>/Library/Caches/NetBeans/7.2/
on Mac OS X
/home/<username>/.cache/netbeans/7.2
on Unix-like systems
Source: http://wiki.netbeans.org/FaqWhatIsUserdir
回答3:
Another Solution to the problem is just start a new project and once you've started a new project. also note if you have a syntax error whilst typing it may not work. But try and see if it helps.
回答4:
Remove nbproject
folder from project directory and then create a new project is works for me:
Steps:
- Close project
- Open project directory in windows explorer
- Delete
nbproject
folder - Go to netbeans, open file menu and select "New Project"
- Create project with existing source
:)
回答5:
Finally works after adding the path of the project in Tools > Options > PHP > Global Include Path > Add Folder... and restarting
回答6:
For those who use Netbeans 11.2, autocompletion could stop working if you set JDK 8 as default for running netbeans (netbeans_jdkhome in netbeans.conf) instead of newer JDK 13.
来源:https://stackoverflow.com/questions/5928301/netbeans-autocomplete-stopped-working