Netbeans 自动完成功能停止工作?
我正在使用 Netbeans 6.9.1,一切都很好,但是突然间,它停止检测对代码所做的任何更改,例如新变量、函数等。如果我尝试重构/重命名变量,例如按 CTRL + R,它说“重构在此上下文中不可用”。
如果重要的话,它在 PHP 项目中。
有什么想法吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
显然删除用户目录中的 .netbeans/var/cache/index 内容(Windows 等上的应用程序数据)修复了它。
Apparently deleting the contents of .netbeans/var/cache/index in your user directory (application data on windows etc) fixed it.
自 NetBeans 7.2 起,cachedir 已移至以下位置:
Windows 上的
C:\Users\\AppData\Local\NetBeans\Cache\7.2\
Mac OS X 上的
/Users/<用户名>/Library/Caches/NetBeans/7.2/
类 Unix 系统上的
/home//.cache/netbeans/7.2
来源:http://wiki.netbeans.org/FaqWhatIsUserdir
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 systemsSource: http://wiki.netbeans.org/FaqWhatIsUserdir
从项目目录中删除
nbproject
文件夹,然后创建一个新项目,这对我有用:步骤:
nbproject
文件夹:)
Remove
nbproject
folder from project directory and then create a new project is works for me:Steps:
nbproject
folder:)
解决这个问题的另一个方法是开始一个新项目,一旦你开始了一个新项目。另请注意,如果您在键入时出现语法错误,则可能无法正常工作。但尝试看看是否有帮助。
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.
工具>插件>安装
然后找到Java SE,
右键单击并激活 在此处输入图像描述
这对我在 netbeans 12.2 上有效
tools>plugins>installed
then find the Java SE,
right click and Activate enter image description here
this works for me on netbeans 12.2
在“工具”>“添加项目的路径”后终于可以工作了选项> PHP>全局包含路径>添加文件夹...
并重新启动
Finally works after adding the path of the project in Tools > Options > PHP > Global Include Path > Add Folder...
and restarting
对于使用 Netbeans 11.2 的用户,如果将 JDK 8 设置为运行 netbeans 的默认值(netbeans.conf 中的 netbeans_jdkhome)而不是较新的 JDK 13,则自动完成功能可能会停止工作。
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.
对我来说,这是项目的后台扫描无法完成,因为某些文件夹中有太多文件。因此自动完成功能不起作用。
考虑忽略不需要的文件夹(“项目属性”->“忽略的文件夹”)并一次仅打开一个项目。
For me it was the background scanning of project(s) could not finish, because there were so many files in some folders. Hence autocomplete was not working.
Consider ignoring folders you dont need ("Project properties" -> "Ignored folders") and opening just one project at a time.