Eclipse PDT does not propose all php functions

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 05:48:56

问题


Eclipse PDT Neon doesn't offer all of PHP functions. for example if i type "is", it just offering me isset:

This my .buildpath:

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

Also these are my .project natures:

<nature>org.eclipse.php.core.PHPNature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>

I removed Eclipse folder and default workspace folder inside /home/{user}/workspace and download Eclipse PDT Neon again, but it didn't help.

I did removed all projects from Eclipse, Removed all of Eclipse files from my project folder (like .project, .buildpath, ...) and then add projects to the eclipse again but it didn't help.

I must add all of my projects configured to PHP7 Interpreter and this is my PHP code assist settings:


回答1:


Can you make a test and create new/empty workspace with simple PHP project to check if its a problem with Eclipse instance or your workspace metadata. Also it would be helpful if you can check logs for anything that looks related (/.metadata/*.log).




回答2:


(This is not the OP problem, but fits to the title and should be documented here IMHO)

Having a .buildpath file with the line

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

is necessary too. There is now way you can fix this from inside Eclipse, you need to change the file and restart eclipse. All project properties and everything will look fine, just some validation and proposal errors will come up.



来源:https://stackoverflow.com/questions/39627770/eclipse-pdt-does-not-propose-all-php-functions

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