How do you add a PHP framework to code assist/completion in Eclipse PDT?
如何在Eclipse PDT中添加PHP框架到代码辅助/完成?
And is it possible to have that framework added as default for all projects?
是否可以将该框架添加为所有项目的默认框架?
1 个解决方案
#1
Generally speaking in Eclipse, you can add a library or framework to code assist/completion by:
一般来说,在Eclipse中,您可以通过以下方式添加库或框架以进行代码辅助/完成:
- Going into Project > Properties
- Under PHP Include Path, pick the "Libaries" tab.
- Add an "external folder" with the path to where your framework is located.
进入项目>属性
在PHP Include Path下,选择“Libaries”选项卡。
添加一个“外部文件夹”,其中包含框架所在的路径。
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.
该功能本身比这更灵活,允许您为数据库连接设置变量,而不必将冗长的配置文件复制到本地安装。
#1
Generally speaking in Eclipse, you can add a library or framework to code assist/completion by:
一般来说,在Eclipse中,您可以通过以下方式添加库或框架以进行代码辅助/完成:
- Going into Project > Properties
- Under PHP Include Path, pick the "Libaries" tab.
- Add an "external folder" with the path to where your framework is located.
进入项目>属性
在PHP Include Path下,选择“Libaries”选项卡。
添加一个“外部文件夹”,其中包含框架所在的路径。
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.
该功能本身比这更灵活,允许您为数据库连接设置变量,而不必将冗长的配置文件复制到本地安装。