简体   繁体   中英

How to set up Netbeans autocomplete with Zend Framework?

Netbeans is giving me poor autocomplete results when working with Zend Framework.

Is there a way that I could work with Netbeans and get a very good level of autocompletion, or am I better off switching to a framework that Netbeans perhaps provides a better autocomplete results for, such as CodeIgniter?

netbeans uses phpDocumentor to provide inline docs for its code completion. In order to do this it needs access to the code files where the doc blocks are. In your case the Zend Framework code.

When you set up your project you need to tell netbeans where these files are located. Each project in netbeans has an include path folder like this

netbeans屏幕截图

If you right click on this and click 'properties' you will be taken to a dialogue that allows you to add code from outside your project to the include path.

netbeans屏幕截图

Add the library/Zend folder to this dialogue so that you get something like this:-

netbeans屏幕截图

This should allow netbeans to give you code completion for ZF. The finished result:-

代码完成屏幕截图

Check the netbeans documentation for more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM