Netbeans autocomplete or code completion for codeigniter

Rakesh Sharma      1 Comment  

How to get netbeans autocomplete or code completion for codeigniter without any plugin

Autocomplete or code completion :-

A instruction or help for related code completion. it’s a feature which is provided by many code editor or IDE(netbeans, dream weaver, eclipse etc.) to write code with help. it shows instructions for functions, syntax what you want to write we can choose from list if we found suitable. Recently I installed netbeans for php development for windows 7. then start works and found it’s netbeans not provide any inbuilt autocomplete feature for codeigniter. so i searched on internet and found many helpful tutorial and get it there is not any inbuilt plugin for this you need to done it manually by code in codeigniter. so below we will see what i did to get netbeans autocomplete or code completion for codeigniter.


steps to setup :-
1. Download netbeans for php development and install it.

2. Now create a new directory on root of your codeigniter project with named “CI_Autocomplete”(choose any name).

3. Now create a new file under “CI_Autocomplete” directory with named “CI_Autocomplete.php” and add below code.

    * @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 {};

4. Now restart your project or netbeans and open your project of codeigniter and on work start autocomplete or code completion should work.

  • Davide Vic Firth Martucci

    works great! thanks