NetBeans PHP代码完成自己的代码 [英] NetBeans PHP code completion for own code

查看:95
本文介绍了NetBeans PHP代码完成自己的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我开始将 NetBeans 6.7 beta 用于PHP开发,而不是使用 Textmate

Recently I started using NetBeans 6.7 beta for PHP development instead of Textmate and MacGDBp. I am rather amazed with it's feature set and most everything worked out of the box, or was easily configured to my liking.

我在代码完成功能方面遇到了问题;它们适用于内置函数,SPL 和我的一些代码,但不是我的所有代码,特别是,无论PHPDoc注释如何,它对我的​​类中的任何方法都不起作用.

I am having an issue with the code completion features though; they work for built-in functions, SPL and some of my code, but not all of my code, specifically, it never works for any methods in my classes, regardless of PHPDoc comments.

我似乎找不到任何体面的问题,更不用说在任何地方有关此特定主题的答案了.似乎其他人在代码完成方面有问题,只是没有启用自动弹出功能.

I can't seem to find any decent questions, let alone answers about this specific subject anywhere. It looks like everybody else who has problems with the code completion just hasn't enabled the auto-popup feature.

所以,最大的问题是:

是否有任何方法影响代码完成缓存,或者我必须添加一些代码才能使其正常工作?我真的很想为我编写的方法完成代码.

Is there any way to influence the code completion cache, or something I have to add to my code to make it work? I'd really like to have code completion for the methods I write.

PS :我已经尝试了多个旧版本的netbeans,它们都存在相同的问题.

PS: I have tried several older versions of netbeans, they all exhibit the same problem.

编辑:我在当前测试项目中放了一个.zip文件. 在此处获取.这是一个非常年轻的项目,请花一天半的时间.

edit: I've put a .zip up of my current test project. get it here. It's a very young project, think a day and a half.

edit2 :以下是我正在查看的屏幕截图.如您所见,它几乎无法完成任何事情,也没有看到PHPDoc文档.

edit2: Below is a screenshot of what i'm looking at. As you can see, it fails to complete pretty much anything, nor does it see the PHPDoc documentation.


推荐答案

我尝试打开您的项目,对于我来说,完成工作似乎还不错.

I've tried opening your project, and the completion seems to be working just fine for me.

我唯一想到的就是尝试删除整个NB缓存,该缓存应位于$HOME/.netbeans/$VERSION/var/cache/中.这是一个疯狂的猜测

The only thing I can think of is to try to delete your entire NB cache, which should be located in $HOME/.netbeans/$VERSION/var/cache/. This is a wild guess

首先创建备份,我没有尝试过!

如果失败了,也许您应该尝试创建一个新项目,这可能会给NB带来麻烦.

If that fails, maybe you should try creating a new project, maybe that will kick NB in the butt.

请注意,在NB 7.2 beta中,缓存已移至$ HOME/.cache/netbeans/$ VERSION.

Note that in NB 7.2 beta, the cache has moved to $HOME/.cache/netbeans/$VERSION.

这篇关于NetBeans PHP代码完成自己的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆