-
Notifications
You must be signed in to change notification settings - Fork 672
Developer Guide: Setting Up Eclipse PDT
mwilkie edited this page Sep 13, 2010
·
20 revisions
Eclipse PDT is a free, cross-platform, full-featured PHP IDE that offers class browsing, code formatting, and method completion.
- Set indentation to spaces: To easily generate code that complies with ThinkTank’s indentation-by-spaces style (as per the Code Style Guide), in your project’s preferences panel, under PHP>Code Style>Formatter, set the “Tab Style” to spaces, and indentation size to 4.
- Add word wrap: Insane but true: Eclipse does not support word wrap natively. Use this experimental add-on to enable it. (via Stack Overflow). Once the plugin’s installed and you’ve restarted, right-click on a file and select “Virtual word wrap” to enable it.
- Run regression tests in Eclipse: Here’s how to install the SimpleTest plugin in Eclipse to run tests in the IDE. (Note from Gina: this plugin doesn’t work on my Mac running 10.6; when I choose “Run as>SimpleTest” nothing happens.)
- Ctrl+Shift+F to format your code
- Ctrl+/ to comment a block of code (hit it again to uncomment)
- Ctrl+O to hop to member
- Ctrl+L to go to line number
- Ctrl+Spacebar for method completion
- More Eclipse keyboard shortcuts
- Boosting your productivity in Eclipse using shortcuts