tips and tricks coding with zend studio for eclipse part - 2

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

Post on 21-Oct-2014

2.120 views

Category:

Technology


1 download

DESCRIPTION

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

TRANSCRIPT

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

Tips and Tricks coding with Zend Studio for Eclipse

Part 2

Hosted by:Peter B. MacIntyre, ZCE

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

About Me• Over 20 years in the IT Industry• Wrote “PHP: The Good Parts” - O’Reilly

Press

• Co-authored:• “Programming PHP 2nd Ed.” - O’Reilly Press

• “Zend Studio for Eclipse Developer’s Guide” – Addison-Wesley

• Tech Edited 10+ IT Books• Wrote Whitepaper for Zend on Team

Development within Zend Studio• Working on a PHP Book for APress• Live in PEI, Canada

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

PHPDoc Entries• Great way to document your

classes, methods and functions• Triggered by /** in the editor

• /** above element to be documented, then press enter

• Right-mouse on element name in Outline view and select source -> Generate Element Comment

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

PHPDoc Entries• Useful tags:o @author – who wrote / updated the code

o @param – parameters expected by the element

o @return – the return value of the element

• More on this tool later in the webinar

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

Connecting Dependent Projects• Allows Studio to help with code

integrationo Right-mouse on project, select properties

o Pick PHP Include Path -> Projects

o Select other projects (OOP Libs, 3rd Party libs)

o Code Editor will now add in any classes, functions in those projects to the code assist.

o F3 will take you to the code definition reference

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

Properties View• Properties View is mostly for HTML

tagso Shows you all the attributes of a given tago Allows you to change code by updating the values in

the view (and vice versa)

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

PHPDoc Revisited• Generation of reference

documentationo Project menu -> Generate PHPDoc (alt + d)o Allows you create full reference documentation in

HTML, XML DocBook, or PDF formats

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

PHP Code Gallery• Meant to share common code

portions within a team or with Zendo Preferences -> PHP -> Code Gallery (not well

documented)o Code Gallery Viewo To gain access to Zend’s Code Gallery, login with your

Zend.com accounto Suggest to Zend’s Code Galleryo Not well done in Studio, needs work and

documentation

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

Working Sets• Used to reduce project listing cluttero Established by selecting the context menu in the PHP

Explorer view.o Choose the portions that you want to include, name the

Set and turn it “on”.

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

Preferences Goodies• Key Mappingo Preferences -> General -> Keys

• Code Error Notificationso Preferences -> PHP -> Symantic Analysis Properties

• Content Assist Settingso Preferences -> -> PHP -> Editor -> Content Assist

• Mark Occurrenceso Preferences -> PHP -> Editor -> Mark Occurrences

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

Preferences Goodies (2)

• Settings in the Tasks Viewo Tasks View -> Context Menu -> Preferences

• Code Templates (new PHP file)o Preferences -> PHP -> Code Style -> Code Templates

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

Short Snappers• Ctrl + Down Arrow – Duplicates the current line of

code (custom setting – re-mapped ctrl+alt+down)• Ctrl + Space – brings up detailed code assist• Ctrl + Shift + space - when inside a function call will

bring up the expected parameters list• If code does not seem to “act” like a PHP file within

editor – check project -> configure to ensure PHP support is turned on

• Ctrl + / toggles comments on and off

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

FOR MORE INFORMATION VISIT HTTP://OSSCUBE.COMOR DROP-IN AN EMAIL TO [email protected]

MY CONTACT: [email protected]

Thank you for your Time and Attention!