An Eclipse plugin for interacting with CakePHP projects
This plugin makes creating and editing CakePHP projects a breeze. Among other things, it binds keys to perform frequently used actions.
- cycle between model, view, controller, JS file.
- open up (M|V|C) from file outline view
- open up (M|C) directly from any file
- open up view by highlighting action method in controller, and doing ctrl+shift+;
- create files that do not exist
- CakePHP v1.3+ support (have only tested on 2.1 so far)
You must have eclipse 3.7 and PDT. You have 2 options to get PDT:
- The most up-to-date version of PDT is now maintained by Zend. To get this version you must download the Zend all-in-one PDT. They don't have an update site for their version of PDT. You should complain.
- From your existing Eclise 3.7 install: help > install new software > (search for PDT)
- Help > Install New Software and add
http://doapp.github.com/cakephp-eclipse-plugin/update-site/
to your list of update sites - If you installed the Zend all-in-one PDT choose TODO. Otherwise choose TODO
- After restart of eclipse, you have to unbind (or change to whatever you want) default Eclipse keybindings. To do this open window > Preferences > General > keys. Find the following and click 'Unbind Command':
- Opens a method in a PHP editor (when: Editing PHP source)
- Toggle Comment (when: Editing PHP source AND Editing in Structured Text Editor AND Editing JavaScript Source AND Editing Script source)
- Now setup your prefrences: window > Preferences > CakePHP. You can override these on a project by project basis by right clicking on your project.
This plugin uses the following convention for JS files:
webroot/js/{Controller}/{view}.js
For example, the view Examples/index.ctp
's JS file would be webroot/js/Examples/index.js
We recommend using the asset_compress plugin to manage all your css/js files.
Ctrl+Shift+; | Cycle between files: Model <-> Controller and View <--> JS Note: if a function is highlighted in the Controller (or in outline view), it will open up the view. |
Ctrl+Shift+M | Opens up the model from any file (including JS) |
Ctrl+Shift+C | Opens up the controller from any file (including JS) |
- OSX debugging. Plugin does not seem to work on OSX, need someone with a MAC to look into why.
- right click>bake on M|V|C directory will kick off eclipse external tool to bake file(s). This might help: http://stackoverflow.com/questions/4591141/how-to-launch-external-tool-from-custom-menu
- ctrl+shift+e to display a typeahead popup of elements to open
- tie in saves to webrf
- figure out supported CakePHP version objects dynamically - package introspection? Class loading?
This plugin was inspired by the open cake file plugin
- asset_compress plugin to manage all your css/js files
- webrf to easily refresh that browser on your other window while you edit
git checkout gh-pages && git pull && git checkout master && git pull
- Syncronize update site, and build
git add update-site/ && git commit -am 'new updatesite build' && git push
cp -Rf update-site /tmp/
git checkout gh-pages && git pull && cp -R /tmp/update-site/* update-site/ && git add update-site/ && git add feature/ && git commit -am 'new updatesite build' && git push