Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Tips and Tricks coding with Zend Studio for Eclipse Part - 2

2,241 views

Published on

Tips and Tricks coding with Zend Studio for Eclipse Part 2 by Peter B. MacIntyre, ZCE

Published in: Technology
  • Be the first to comment

Tips and Tricks coding with Zend Studio for Eclipse Part - 2

  1. 1. Tips and Tricks coding with Zend Studio for Eclipse Part 2 Hosted by: Peter B. MacIntyre, ZCE
  2. 2. About Me <ul><ul><li>Over 20 years in the IT Industry </li></ul></ul><ul><ul><li>Wrote “PHP: The Good Parts” - O’Reilly Press </li></ul></ul><ul><ul><li>Co-authored: </li></ul></ul><ul><ul><ul><li>“ Programming PHP 2 nd Ed.” - O’Reilly Press </li></ul></ul></ul><ul><ul><ul><li>“ Zend Studio for Eclipse Developer’s Guide” – Addison-Wesley </li></ul></ul></ul><ul><ul><li>Tech Edited 10+ IT Books </li></ul></ul><ul><ul><li>Wrote Whitepaper for Zend on Team Development within Zend Studio </li></ul></ul><ul><ul><li>Working on a PHP Book for APress </li></ul></ul><ul><ul><li>Live in PEI, Canada </li></ul></ul>
  3. 3. PHPDoc Entries <ul><ul><li>Great way to document your classes, methods and functions </li></ul></ul><ul><ul><li>Triggered by /** in the editor </li></ul></ul><ul><ul><ul><li>/** above element to be documented, then press enter </li></ul></ul></ul><ul><ul><ul><li>Right-mouse on element name in Outline view and select source -> Generate Element Comment </li></ul></ul></ul>
  4. 4. PHPDoc Entries <ul><ul><li>Useful tags: </li></ul></ul><ul><ul><ul><li>@author – who wrote / updated the code </li></ul></ul></ul><ul><ul><ul><li>@param – parameters expected by the element </li></ul></ul></ul><ul><ul><ul><li>@return – the return value of the element </li></ul></ul></ul><ul><li>More on this tool later in the webinar </li></ul>
  5. 5. Connecting Dependent Projects <ul><ul><li>Allows Studio to help with code integration </li></ul></ul><ul><ul><ul><li>Right-mouse on project, select properties </li></ul></ul></ul><ul><ul><ul><li>Pick PHP Include Path -> Projects </li></ul></ul></ul><ul><ul><ul><li>Select other projects (OOP Libs, 3 rd Party libs) </li></ul></ul></ul><ul><ul><ul><li>Code Editor will now add in any classes, functions in those projects to the code assist. </li></ul></ul></ul><ul><ul><ul><li>F3 will take you to the code definition reference </li></ul></ul></ul>
  6. 6. Properties View <ul><ul><li>Properties View is mostly for HTML tags </li></ul></ul><ul><ul><ul><li>Shows you all the attributes of a given tag </li></ul></ul></ul><ul><ul><ul><li>Allows you to change code by updating the values in the view (and vice versa) </li></ul></ul></ul>
  7. 7. PHPDoc Revisited <ul><ul><li>Generation of reference documentation </li></ul></ul><ul><ul><ul><li>Project menu -> Generate PHPDoc (alt + d) </li></ul></ul></ul><ul><ul><ul><li>Allows you create full reference documentation in HTML, XML DocBook, or PDF formats </li></ul></ul></ul>
  8. 8. PHP Code Gallery <ul><ul><li>Meant to share common code portions within a team or with Zend </li></ul></ul><ul><ul><ul><li>Preferences -> PHP -> Code Gallery (not well documented) </li></ul></ul></ul><ul><ul><ul><li>Code Gallery View </li></ul></ul></ul><ul><ul><ul><li>To gain access to Zend’s Code Gallery, login with your Zend.com account </li></ul></ul></ul><ul><ul><ul><li>Suggest to Zend’s Code Gallery </li></ul></ul></ul><ul><ul><ul><li>Not well done in Studio, needs work and documentation </li></ul></ul></ul>
  9. 9. Working Sets <ul><ul><li>Used to reduce project listing clutter </li></ul></ul><ul><ul><ul><li>Established by selecting the context menu in the PHP Explorer view. </li></ul></ul></ul><ul><ul><ul><li>Choose the portions that you want to include, name the Set and turn it “on”. </li></ul></ul></ul>
  10. 10. Preferences Goodies <ul><ul><li>Key Mapping </li></ul></ul><ul><ul><ul><li>Preferences -> General -> Keys </li></ul></ul></ul><ul><ul><li>Code Error Notifications </li></ul></ul><ul><ul><ul><li>Preferences -> PHP -> Symantic Analysis Properties </li></ul></ul></ul><ul><ul><li>Content Assist Settings </li></ul></ul><ul><ul><ul><li>Preferences -> -> PHP -> Editor -> Content Assist </li></ul></ul></ul><ul><ul><li>Mark Occurrences </li></ul></ul><ul><ul><ul><li>Preferences -> PHP -> Editor -> Mark Occurrences </li></ul></ul></ul>
  11. 11. Preferences Goodies (2) <ul><ul><li>Settings in the Tasks View </li></ul></ul><ul><ul><ul><li>Tasks View -> Context Menu -> Preferences </li></ul></ul></ul><ul><ul><li>Code Templates (new PHP file) </li></ul></ul><ul><ul><ul><li>Preferences -> PHP -> Code Style -> Code Templates </li></ul></ul></ul>
  12. 12. Short Snappers <ul><li>Ctrl + Down Arrow – Duplicates the current line of code (custom setting – re-mapped ctrl+alt+down) </li></ul><ul><li>Ctrl + Space – brings up detailed code assist </li></ul><ul><li>Ctrl + Shift + space - when inside a function call will bring up the expected parameters list </li></ul><ul><li>If code does not seem to “act” like a PHP file within editor – check project -> configure to ensure PHP support is turned on </li></ul><ul><li>Ctrl + / toggles comments on and off </li></ul>
  13. 13. FOR MORE INFORMATION VISIT HTTP://OSSCUBE.COM OR DROP-IN AN EMAIL TO [email_address] MY CONTACT: [email_address] <ul><li>Thank you for your </li></ul><ul><li>Time and Attention! </li></ul>

×