To get code completion to work you need to add the library to your build path. For example… adding WordPress to your build path.
To be able to see the add_filter and add_action functions in code completion, you can modify the build path to add the WordPress wp-includes directory.
To add the WordPress wp-includes directory to your build path, choose Project > Properties with your PHP project highlighted. On the Libraries tab, click Add External Source Folder, then browse to the wp-includes directory found where you installed WordPress. Click OK when you’re finished. Now you can type add_ into the PHP editor, invoke code completion, and see a list that includes add_action and add_filter.
For code completion of model and view in CakePHP see http://mark-story.com/posts/view/code-completion-for-cakephp-in-eclipse.