Eclipse(Helios) 上没有自动完成功能

发布于 2024-10-10 03:31:14 字数 255 浏览 0 评论 0原文

我在 Eclipse (Helios) 中的自动完成选项遇到问题。 我已经检查过 Windows-> 首选项-> PHP-> 编辑器-> 内容辅助,那里的一切似乎都是正确的。 当我在任何课程中写下“self::”时,当我确实完成时,但这是我得到它的唯一情况。

例如.. “父母::” 或者 “$这个->”.. 根本不起作用..有什么想法吗?

顺便说一句,我在 Lunix、Ubuntu 10.10 下工作,

提前致谢。

I'm having a problem with the autocomplete option in Eclipse (Helios).
I've already checked Windows->Preferences->PHP->Editor->Content Assist and everything seems to be correct there.
And when I do get completions when I write "self::" in any of my classes, but this is the only situation I get it.

For example..
"parent::"
or
"$this->"..
Don't work at all.. any ideas?

Btw, I'm working under Lunix, Ubuntu 10.10

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

陈独秀 2024-10-17 03:31:14

需要检查的一些事项:

1) .project 文件包含:

<nature>org.eclipse.php.core.PHPNature</nature>

2) .buildpath 包含:

<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>

3) 右键单击​​项目并转到 Configure ->添加 PHP 支持

4) 您在代码中使用命名空间吗?如果是这样,在没有命名空间的情况下,即在全局命名空间中,补全工作是否有效?

我还可以在 bugzilla 与 PDT 中的代码完成相关。看看吧。

A few things to check:

1) .project file contains:

<nature>org.eclipse.php.core.PHPNature</nature>

2) .buildpath contains:

<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>

3) Right-click project and go to Configure -> Add PHP Support

4) Are you using a namespace in your code? If so, does completion work without a namespace i.e. in a global namespace

I can also see quite a few open issues in bugzilla related to code completion in PDT. Take a look.

绝對不後悔。 2024-10-17 03:31:14

因为看起来你已经尝试过网络上记录的基本解决方案(phpnature、添加 php 支持、buildpath 等),所以最好查看日志并提供当你尝试调用 auto 时发生的任何错误-完成。

您可以“尾部”日志并检查在要求自动完成时是否出现任何内容(在类的方法中写入“$this->”后按 Ctrl+Space):

tail myWorkspace/.metadata/.log -f

显示的错误可能对于搜索谷歌或包含在此处以供其他人提供帮助很有用!

Since it seems that yoy've already tried the basic solutions that are documented across the web (phpnature, add php support, buildpath, etc.) it's probably best to look at the logs and provide any error that occurs when you try to call auto-completion.

You can "tail" the log and check if anything appears when asking for an autocomplete (press Ctrl+Space after writing "$this->" inside a method of a class):

tail myWorkspace/.metadata/.log -f

The error that appears may be usefull for searching google or for including here for others to help!

安静被遗忘 2024-10-17 03:31:14

似乎将 Eclipse 更新为 Build id: 20100917-0705 解决了这个问题。

Seems like updating Eclipse to Build id: 20100917-0705 solved this issue.

贪了杯 2024-10-17 03:31:14

如果你只是升级 eclipse 你应该重命名/删除工作区/.metadata

有时会出现兼容性问题...

If you just upgrade eclipse you should rename/remove workspace/.metadata

some times there is compatibility issues...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文