Eclipse Code Completion for cakePHP
Code Completion in Controllers
Add this to your app_controller.php for every Component and Model you want to have completed by eclipse:
/** * @var CookieComponent */ var $Cookie; . . . /** * @var Yourmodel */ var $Yourmodel; . . .
Eclipse will use the PHPdoc for code completion.
Code Completion in Views
Add this to an extra file e.g. eclipse_cc.php:
$html = new HtmlHelper(); $javascript = new JavascriptHelper(); . . .
There is no need to include this file, just put it in your app folder and it will fool eclipse.
on October 13, 2007 on 5:18 am
[...] Eclipse Code Completion for cakePHP « Schneimi’s Cake Weblog A couple of ‘hacks’ to improve CakePHP code autocomplete feature in the Eclipse editor (tags: eclipse cakephp autocomplete) [...]
on January 28, 2008 on 8:39 am
Hey
Just looking across the wide and vast interweb for some help about eclipse code completion and stumbled across this – turns out the actual contents of this post has nothing to do with auto-completion… do you have the original post somewhere?!
Cheers
Seb
on January 28, 2008 on 3:19 pm
Hi Seb,
thats weird, the original post is just gone and I can’t find it anywhere…though I didn’t touch it at all.
I still hope I can recover it somehow, but it doesn’t look good for the moment.
Meanwhile you can check out the following link, you should find all info there as well: http://groups.google.com/group/cake-php/browse_thread/thread/04b94b593714b394/9c71e02157bcaacd
Hope that helps,
schneimi