How do you add a PHP framework to code completion/assist in Eclipse PDT and can the framework be added as default for all projects?

旧时模样 提交于 2019-12-18 08:24:11

问题


How do you add a PHP framework to code assist/completion in Eclipse PDT?

And is it possible to have that framework added as default for all projects?


回答1:


Generally speaking in Eclipse, you can add a library or framework to code assist/completion by:

  1. Going into Project > Properties
  2. Under PHP Include Path, pick the "Libaries" tab.
  3. Add an "external folder" with the path to where your framework is located.

This can also be done on project creation. I'm not sure of a way to have it automatically attach a library in this way.

The feature itself is a bit more flexible than that, allowing you to do things like set variables for a DB connection, rather than having to copy down lengthy config files to your local install.



来源:https://stackoverflow.com/questions/903769/how-do-you-add-a-php-framework-to-code-completion-assist-in-eclipse-pdt-and-can

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