Schneimi’s Dev Weblog


Eclipse Code Completion for cakePHP

Posted in CakePHP, Eclipse by schneimi on the October 12, 2007
Tags: , , , , , ,

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.

3 Responses to 'Eclipse Code Completion for cakePHP'

Subscribe to comments with RSS or TrackBack to 'Eclipse Code Completion for cakePHP'.


  1. [...] 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) [...]

  2. Seb Maynard said,

    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 :D

    Seb

  3. schneimi said,

    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


Leave a Reply