0

My eclipse has no PHP core code completion functionality. I tried with new downloads, no chance.

How to add the Php Language Library?

edit to add: this occurred on an existing project which was messed up in the beginning

til
  • 832
  • 11
  • 27
  • Does this answer your question? [How to install a PHP IDE plugin for Eclipse directly from the Eclipse environment?](https://stackoverflow.com/questions/2397978/how-to-install-a-php-ide-plugin-for-eclipse-directly-from-the-eclipse-environmen) – Nico Haase Jun 04 '20 at 14:25

1 Answers1

1

Enabling the validation didnt work for me. I fixed it by ensuring that I have a .buildpath file in my project's root folder. the file looks like that:

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

specifically adding this part does the job.
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>

I wasn't able to find a UI based solution (even with 3-20) - directly modifying the file worked for me

til
  • 832
  • 11
  • 27
  • Very impressive how you found an answer yourself in almost no time. Unfortunately, I cannot even reproduce the issue. How did you create the project so that the code completion is missing? Why does it work for others and not for you? – howlger Jun 04 '20 at 14:28
  • I've been working without the core library for quite a while, with messed up project setup, pulled from left and right. I was properly annoyed yesterday and tried to figure it out, also with your answer: https://stackoverflow.com/a/45833056/5011027. As it didnt work for me even with 3-20, I created a fresh project and compared all files of the new one with the old and found the difference then. edit to add: the specific line was missing in the `.buildpath` - deleting the line might reproduce the issue – til Jun 05 '20 at 10:21