Code completion/assist for built-in PHP functions in Eclipse PDT

我只是一个虾纸丫 提交于 2019-12-03 02:54:13

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.

Right-click on your top-level project folder in PHP Explorer. Go down to the Configure menu-item. Select "add PHP support".

DeaconDesperado

Do you have auto-activate enabled? If you're looking for a prompt as you type you'll need to enable it.

Window->Preferences->Select PHP and then Code assist and it will be the last option in the dialog. You can set a delay time for the prompts as well.

Otherwise, you need to press Ctrl+Enter to make the prompts appear.

in .buildpath, suppress this line if existing :

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

in .project, suppress this line if existing :

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

right click on project > Configure > Add PHP support...

if you go to windows->preferences and look through your php settings, you'll find that some of the auto complete features are not checked

Latest PDT is bugged all over. Try to make namespaced class and you will end up having autocomplete broken at all. How could they release stable Zend Studio 7.0 with such a bright bug - I don't know.

I'd recommend to stay on elder versions. PHP 5.3 support is incomplete.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!