Eclipse PDT does not propose all php functions

2019-08-02 03:35发布

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

Eclipse PDT PHP default proposals

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:

Eclipse Code Assist

2条回答
倾城 Initia
2楼-- · 2019-08-02 04:04

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).

查看更多
唯我独甜
3楼-- · 2019-08-02 04:17

(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.

查看更多
登录 后发表回答