EllisLab text mark
Advanced Search
1 of 3
1
   
Netbeans 7.0 (final) autocomplete for CI 2.0
Posted: 03 May 2011 12:39 AM   [ Ignore ]
Joined: 2011-05-03
3 posts

I was able get autocomplete to work correctly within Netbeans 7.0 (final).

Instructions:

1.  Create a new directory inside nbproject (I used this since it’s omitted when pushing to prod) with your name of choice, I used “CI_Autocomplete”.

2.  Create a new file with your name of choice, I used “CI_Autocomplete_2.0.php”, and place it inside the newly created folder, “nbproject\CI_Autocomplete”.

3.  Paste the below code inside the new file, “CI_Autocomplete_2.0.php”. File content courtesy of http://ellislab.com/forums/viewthread/180079/.

<?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 {};

?> 

4.  Now go to (this is for OSX so not sure if it’s the same for Windows) File > Project Properties (projectname) > PHP Include Path and include the new folder you created above, nbproject\CI_Autocomplete.

5.  Restart your project and autocomplete “should” work.

 
Posted: 03 May 2011 02:22 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2011-04-13
21 posts

awesome

 
Posted: 03 May 2011 10:07 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2010-09-17
606 posts

Do people ever search the forums or google before posting? This is godly old news.

 Signature 

I love lasagne!

 
Posted: 03 May 2011 11:45 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Joined: 2011-05-03
3 posts

Part of it is old news.  The latest version of Netbeans 7.0 just released and the “godly old news” steps were not exactly the same as in 6.9.

 
Posted: 03 May 2011 12:43 PM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2007-11-29
77 posts

My netbeans 7.0 supports autocomplete for CI 2.0 out of the box, i didn’t need to change or add anything.

 Signature 

Junior PHP dev looking for a project to get started with.

 
Posted: 03 May 2011 12:51 PM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2007-11-29
77 posts
atno - 03 May 2011 04:43 PM

My netbeans 7.0 supports autocomplete for CI 2.0 out of the box, i didn’t need to change or add anything.

nevermind this post smile

 Signature 

Junior PHP dev looking for a project to get started with.

 
Posted: 03 May 2011 03:19 PM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2010-07-31
54 posts

you can add your models to the controllers too…. very useful

 Signature 

William Rufino is a Web Developer from Brazil and writes a blog a about codeigniter and web development on www.williamrufino.com.br/blog/ (in portuguese)

Owner of Hollo Interact

 
Posted: 09 May 2011 05:31 AM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Joined: 2011-05-06
2 posts

what kind of autocomplete you guys are getting ?
I am using netbeans 7 with codeigniter 2 but not getting so much auto-completion :(

 
Posted: 09 May 2011 09:48 AM   [ Ignore ]   [ # 8 ]   [ Rating: 0 ]
Avatar
Joined: 2007-11-29
77 posts
sarim khan - 09 May 2011 09:31 AM

what kind of autocomplete you guys are getting ?
I am using netbeans 7 with codeigniter 2 but not getting so much auto-completion :(

if would you care to explain what steps did you take we then might be able to help you. “not getting so much auto-completion” aint much of problem description…

 Signature 

Junior PHP dev looking for a project to get started with.

 
Posted: 09 May 2011 02:26 PM   [ Ignore ]   [ # 9 ]   [ Rating: 0 ]
Joined: 2011-05-06
2 posts
atno - 09 May 2011 01:48 PM

if would you care to explain what steps did you take we then might be able to help you. “not getting so much auto-completion” aint much of problem description…

I am getting much much autocomplete now, after following this tutorial, but at first i thought that netbeans 7 will support codecomplete out of the box but it wasn’t. raspberry


Thank you very much REK. smile

 
Posted: 09 May 2011 02:38 PM   [ Ignore ]   [ # 10 ]   [ Rating: 0 ]
Avatar
Joined: 2007-11-29
77 posts
sarim khan - 09 May 2011 06:26 PM
atno - 09 May 2011 01:48 PM

if would you care to explain what steps did you take we then might be able to help you. “not getting so much auto-completion” aint much of problem description…

I am getting much much autocomplete now, after following this tutorial, but at first i thought that netbeans 7 will support codecomplete out of the box but it wasn’t. raspberry


Thank you very much REK. smile

Oh sorry, i now understand your problem. You have to do “this” and “that” to be able to have auto-complete.

Hope that helps,
atno

 Signature 

Junior PHP dev looking for a project to get started with.

 
Posted: 09 May 2011 11:40 PM   [ Ignore ]   [ # 11 ]   [ Rating: 0 ]
Avatar
Joined: 2010-01-10
55 posts

I know this is silly to ask in a netbeans topic but I have grown tired of netbean’s excessive memory usage (500mb+) courtesy of Java. Are there any freeware windows IDE that is similar to Netbeans that doesn’t run on Java? If not, I’ll keep using this and will add in the code that REK created. Thanks REK!

 
Posted: 12 May 2011 02:32 PM   [ Ignore ]   [ # 12 ]   [ Rating: 0 ]
Avatar
Joined: 2008-09-11
966 posts

Thanks,

Just what I was looking for! You are awesome!

 Signature 

Google Analytics HOWTO | Enable GET | Netbeans PHP Integration

 
Posted: 13 May 2011 08:35 PM   [ Ignore ]   [ # 13 ]   [ Rating: 0 ]
Joined: 2008-11-09
37 posts

Brilliant….Thanks a lot!!!

 
Posted: 14 May 2011 08:54 PM   [ Ignore ]   [ # 14 ]   [ Rating: 0 ]
Avatar
Joined: 2011-05-14
1 posts

Hi guys. Is there anyway to make autocomplete work at the views?

 
Posted: 19 May 2011 06:45 PM   [ Ignore ]   [ # 15 ]   [ Rating: 0 ]
Joined: 2010-09-28
69 posts

REK, can you help explain to me step 4 in your post. I’ve created the file added the content but not sure what do do in my project.properties file. It looks like this right now.

include.path=${php.global.include.path}
php.version=PHP_5
source.encoding=UTF-8
src.dir=.
tags.asp=false
tags.short=true
web.root=.

I’m not sure what I need to add to it. Just the name of the file?

 
1 of 3
1