Eclipse PDT内置PHP函数的代码完成/协助 [英] Code completion/assist for built-in PHP functions in Eclipse PDT

查看:103
本文介绍了Eclipse PDT内置PHP函数的代码完成/协助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse PDT(PHP开发工具)中编写PHP代码,但由于某些原因,它不会自动完成PHP内置函数(如isset())。这与Komodo不同,它也显示了函数接收的参数。 Eclipse自动完成的唯一的事情是我的变量。 Hwo可以让Eclipse自动完成内置的功能吗?

解决方案

我遇到一个类似的问题,找到一个修复,但是,这是一个黑客,因为我不能找到一种在Eclipse菜单中进行更改的方法。基本上,我需要将以下.buildpath文件添加到项目文件夹的根目录中:

 <?xml version =1.0 encoding =UTF-8?> 
< buildpath>
< buildpathentry kind =srcpath =/>
< buildpathentry kind =conpath =org.eclipse.php.core.LANGUAGE/>
< / buildpath>

如果你已经有一个.buildpath文件,你可能只需将行添加到现有文件中: / p>

 < buildpathentry kind =conpath =org.eclipse.php.core.LANGUAGE/> 

我相信,当我从现有的源代码创建一个项目而不是创建一个新项目时,我遇到了这个问题。



自从您提出问题以来,已经有一个月了,希望这仍然有帮助。


I'm writing PHP code in Eclipse PDT (PHP Development Tools), but for some reason it doesn't auto-complete PHP built-in functions, such as "isset()". This is unlike Komodo which also shows the arguments the function recieves. The only thing Eclipse auto-completes are my variables. Hwo can I make Eclipse auto-complete built-in functions?

解决方案

I came across a similar issue and found a fix for it, however, it's a bit of hack as I couldn't find a way to make the change in the Eclipse Menus. Basically I needed to add the following .buildpath file to the root of the project folder:

<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
 <buildpathentry kind="src" path=""/>
 <buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
</buildpath>

If you already have a .buildpath file you could probably just add the line to the existing file:

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

I believe I came across this issue when I created a project from existing source instead of creating a new project.

Its been a month since you asked your question so hopefully this is still helpful.

这篇关于Eclipse PDT内置PHP函数的代码完成/协助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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