|
发表于 2012-1-8 16:32:28
|
显示全部楼层
下面这个简单
http://blog.donews.com/jiji262/2011/11/netbeans-7-0%E5%8A%A0%E5%85%A5codeigniter-2-0%E7%9A%84%E4%BB%A3%E7%A0%81%E8%87%AA%E5%8A%A8%E6%8F%90%E7%A4%BA/
--------------
Netbeans 7.0加入CodeIgniter 2.0的代码自动提示
Posted by 令狐葱 on 2011年11月07日 Leave a comment (11)Go to comments
1. 创建一个新文件,命名为CI_Autocomplete_2.0.php。内容如下:
<?php
/**
* @property CI_DB_active_record $db
* @property CI_DB_forge $dbforge
* @property CI_Benchmark $benchmark
* @property CI_Calendar $calendar
* @property CI_Cart $cart
* @property CI_Config $config
* @property CI_Controller $controller
* @property CI_Email $email
* @property CI_Encrypt $encrypt
* @property CI_Exceptions $exceptions
* @property CI_Form_validation $form_validation
* @property CI_Ftp $ftp
* @property CI_Hooks $hooks
* @property CI_Image_lib $image_lib
* @property CI_Input $input
* @property CI_Language $language
* @property CI_Loader $load
* @property CI_Log $log
* @property CI_Model $model
* @property CI_Output $output
* @property CI_Pagination $pagination
* @property CI_Parser $parser
* @property CI_Profiler $profiler
* @property CI_Router $router
* @property CI_Session $session
* @property CI_Sha1 $sha1
* @property CI_Table $table
* @property CI_Trackback $trackback
* @property CI_Typography $typography
* @property CI_Unit_test $unit_test
* @property CI_Upload $upload
* @property CI_URI $uri
* @property CI_User_agent $user_agent
* @property CI_Validation $validation
* @property CI_Xmlrpc $xmlrpc
* @property CI_Xmlrpcs $xmlrpcs
* @property CI_Zip $zip
*/
class CI_Controller {};
/**
* @property CI_DB_active_record $db
* @property CI_DB_forge $dbforge
* @property CI_Config $config
* @property CI_Loader $load
* @property CI_Session $session
*/
class CI_Model {};
?>
2. 将文件CI_Autocomplete_2.0.php拷贝到项目目录下面的文件夹nbproject内。
3. 重启netbeans。
效果:
注意:如果额外使用了sparks,可以添加类似代码如下:
* @property Formbuilder $formbuilder
* @property Template $template
* @property Ion_auth $ion_auth
参考链接:http://codeigniter.com/forums/viewthread/187949/P0/ |
|