Skip to content

vahidqara/cakephp-eclipse-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cakephp-eclipse-plugin

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.

Features

  • 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)

Installing

Requirements

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)

Install plugin and configure enviornment

  1. Help > Install New Software and add http://doapp.github.com/cakephp-eclipse-plugin/update-site/ to your list of update sites
  2. If you installed the Zend all-in-one PDT choose TODO. Otherwise choose TODO
  3. 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)
  4. 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.

Usage

Key Bindings

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+MOpens up the model from any file (including JS)
Ctrl+Shift+COpens up the controller from any file (including JS)

TODO/Need help

Thanks

This plugin was inspired by the open cake file plugin

Things that we find useful along side of this plugin

Build instructions

  1. git checkout gh-pages && git pull && git checkout master && git pull
  2. Syncronize update site, and build
  3. git add update-site/ && git commit -am 'new updatesite build' && git push
  4. 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published