SlideShare una empresa de Scribd logo
1 de 33
Descargar para leer sin conexión
Workshop


                  Hands on Eclipse PDT 2.x




Bastian Feder                                 IPC 2009
papaya Software GmbH                         15.11.2009
Me, myself & I
           Application developer
           PHP since 2001
           @papaya since
            01.2008
           OpenSource addict
Who are you?
Installation
   Download latest revision from Eclipse website
    (http://www.eclipse.org/pdt/downloads)
    ▹   All in one (recommended):
        provides everything you need to run PDT
    ▹   PDT Feature / Update Manager:
        extends an existing Eclipse, but all dependencies PDT
        relies on needs to be installed first.
   Extract archive
   Copy to favorized location
    (e.g. /usr/local/bin/ or another location in your application path)
Installation (II)
●   Java Runtime Environment
        –   Linux: sun-java6-jre from multiverse repository
●   Switch off any kind of indexer and/or crawler
        –   Virus scanner
        –   Spotlight (MacOsX)
        –   GnomeDo / KRunner (Linux)
        –   Windows Indexing Service
        –   ...
Start the engines
●   Set current language
       –   System > Systemverwaltung >
            Sprachunterstützung
●   open Anwendungen > Zubehör > Terminal


           #> cd IPC09_Workshop ¶

           #> sudo chmod -R ubuntu:ubuntu workspace ¶

           #> ./bin/eclipse/eclipse ¶
Configuration




 HandsOn
Tips and Tricks (Configuration)
   Heap space (memory allocated by JRE)
    size depends on system memory capacity
    ▹   Xms, Xmx
    ▹   XXMaxPermSize, XXPermSize
   Eclipse PDT settings
    ▹   validation / build settings
    ▹   disable automatic updates
Look and feel




 HandsOn
Perspectives & Views
   Perspective
    (Window > Open Perspektive)
    ▹   Arrangement of Views:
        PHP Perspektive contains e.g. 'PHP Explorer',
        'Outline' and 'Project Outline'
   Views or Tabs
    (Window > Show View)
    ▹   Viewport providing specific information and/or
        functionality
Working Sets




Group elements for display in views or for
   operations on a set of elements.
Pause




        Until   14:45hrs
Working with Eclipse
   Projects
   Templates
   Code completion
   ...
Projects
        Organizational untis
        Customizable
         configuration
        PHP include path
           ▹   Validation
        Build rules
           ▹   included resources
           ▹   excluded resources
Templates
   Contextual predefined
    code snippets
   Configure at
    Preferences > PHP >
    Templates
File templates
   Create new files with
    predefined structures
   Easy to create or
    adapt
Code templates
   Activation key:
    <CTRL> + space
   Code templates
    ▹   Eases typing of complex code structures
        (e.g. switch – statement)
    ▹   Minimize errors
                                           switch ($action) {
    ▹   Act like a form                    case 'read':
                                            ;
                                            break;

                                           default:
                                             ;
                                             break;
                                           }
Code templates (II)
   Capable of code completion
   Set cursor positioning (${cursor}, ${})
   Dynamic content by use of variables
    ▹   ${class}                  switch (${dollar}${variable}) {
                                  case ${value}:
    ▹   ${function}                ${cursor};
    ▹   ${variable}                break;

    ▹   ${value}                  default:
                                  ;
                                  break;
                                  }
Pause




        Until   16:00hrs
External Tools Framework
   Enables Eclipse to run ,stand-alone'
    applications
   Two broad classes of external tools are
    available:
    ▹   Ant build files
    ▹   Everything else
Subversive




HandsOn
Subversive (installation)
   Eclipse update site
    http://download.eclipse.org/technology/subversive/0.7/update-site/
Subversion (client configuration)
      Set „auto-properties“
        ▹   WinXp:
            C:Dokumente und Einstellungen<USER>AnwendungsdatenSubversionconfig

        ▹   MacOs / Linux: ~/.subversion/config
[miscellany]
global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store .project .cache .settings
enable-auto-props = yes

[auto-props]
*.js = svn:eol-style=LF;svn:keywords=Id LastChangedDate LastChangedRevision URL
*.css = svn:eol-style=LF;svn:keywords=Id LastChangedDate LastChangedRevision URL
*.php = svn:eol-style=LF;svn:keywords=Id LastChangedDate LastChangedRevision URL
*.html = svn:eol-style=LF;svn:mime-type=text/html;svn:keywords=LastChangedDate LastChangedRevision URL
*.htm = svn:eol-style=LF;svn:mime-type=text/html;svn:keywords=LastChangedDate LastChangedRevision URL
*.xsl = svn:eol-style=LF
*.xml = svn:eol-style=LF
*.xsd = svn:eol-style=LF
Plugins
   Subclipse
    managing SVN repositories from inside Eclipse
   JSEclipse
    Provides additional features supporting JavaScript
   Data Tools Platform
    managing databases from inside Eclipse
xDebug
   Debugging for PHP by Derick Rethans
    (http://www.xdebug.org)
   Provides profiling, tracing, code coverage, …
   Cross platform
xDebug configuration
   Add to php.ini (e.g. on Mac)
 [XDebug]
 ;; Only Zend OR (!) XDebug
 zend_extension="/Applications/xampp/xamppfiles/lib/php/php5/extensions/no-debug-non-zts-20060613/xdebug.so"
 xdebug.remote_enable=true
 xdebug.remote_host=127.0.0.1 ;if debugging on remote server, put client IP here
 xdebug.remote_port=9000
 xdebug.remote_handler=dbgp
 ;; profiler
 xdebug.profiler_enable=Off
 xdebug.profiler_enable_trigger=On
 xdebug.profiler_output_dir=/data_lokal/temp/xdebug/profiling

   or .htaccess - file
  #-------------------------------#
  # xDebug section                #
  #-------------------------------#
  php_value xdebug.remote_enable 1
  php_value xdebug.remote_handler bdgp
  php_value xdebug.remote_host 127.0.0.1 ;if debugging on remote server, put client IP here
;; php_value xdebug.allowed_clients <client IP address>
  php_value xdebug.remote_port 9000
  # profiler
  php_value xdebug.profiler_enable_trigger 1
  php_value xdebug.profiler_enable 0
  php_value xdebug.profiler_output_dir "/data_lokal/temp/xdebug/profiling"
xDebug (III)
   Debug dialog
xDebug (IV)
   Configure PDT to talk to xDebug
xDebug (IV)
   Configure the 'Server' handling the debugging
    session
Questions?




             Further questions? Ask me at:

             php@bastian-feder.de
Contact'n Rate
   Contact
        ▹   Blog: http://bastian-feder.de
        ▹   Email: php@bastian-feder.de


   Rate the workshop @
    http://joind.in/talk/view/1067
References
   Eclipse PDT
    (http://www.eclipse.org/pdt)

   Eclipse plugins
     ▹   Subversive (http://subclipse.tigris.org)
     ▹   JSEclipse (http://www.interaktonline.com/products/eclipse/jseclipse/overview)
   xDebug
    (http://www.xdebug.org)

   PhpDocumentor @ pear.php.net
    (http://pear.php.net/package/PhpDocumentor/docs/1.4.2)

   SVN keyword substitution
    (http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.advanced.props.special.keywords)
License
   This set of slides and the source code included
    in the download package is licensed under the

        Creative Commons Attribution-
     Noncommercial-Share Alike 2.0 Generic
                   License


      http://creativecommons.org/licenses/by-nc-sa/2.0/deed.en

Más contenido relacionado

La actualidad más candente

OpenStack Swift Command Line Reference Diablo v1.2
OpenStack Swift Command Line Reference Diablo v1.2OpenStack Swift Command Line Reference Diablo v1.2
OpenStack Swift Command Line Reference Diablo v1.2
Amar Kapadia
 
Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scripting
Tony Fabeen
 

La actualidad más candente (20)

Portland Puppet User Group June 2014: Writing and publishing puppet modules
Portland Puppet User Group June 2014: Writing and publishing puppet modulesPortland Puppet User Group June 2014: Writing and publishing puppet modules
Portland Puppet User Group June 2014: Writing and publishing puppet modules
 
Gr8conf EU 2018 - Bring you infrastructure under control with Infrastructor
Gr8conf EU 2018 - Bring you infrastructure under control with InfrastructorGr8conf EU 2018 - Bring you infrastructure under control with Infrastructor
Gr8conf EU 2018 - Bring you infrastructure under control with Infrastructor
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of Puppet
 
Gradle in a Polyglot World
Gradle in a Polyglot WorldGradle in a Polyglot World
Gradle in a Polyglot World
 
Puppet modules for Fun and Profit
Puppet modules for Fun and ProfitPuppet modules for Fun and Profit
Puppet modules for Fun and Profit
 
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
Django로 만든 웹 애플리케이션 도커라이징하기 + 도커 컴포즈로 개발 환경 구축하기
 
Who is afraid of privileged containers ?
Who is afraid of privileged containers ?Who is afraid of privileged containers ?
Who is afraid of privileged containers ?
 
Caché acelerador de contenido
Caché acelerador de contenidoCaché acelerador de contenido
Caché acelerador de contenido
 
node.js - Eventful JavaScript on the Server
node.js - Eventful JavaScript on the Servernode.js - Eventful JavaScript on the Server
node.js - Eventful JavaScript on the Server
 
OpenStack Swift Command Line Reference Diablo v1.2
OpenStack Swift Command Line Reference Diablo v1.2OpenStack Swift Command Line Reference Diablo v1.2
OpenStack Swift Command Line Reference Diablo v1.2
 
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
 
AngularDart - Meetup 15/03/2017
AngularDart - Meetup 15/03/2017AngularDart - Meetup 15/03/2017
AngularDart - Meetup 15/03/2017
 
Puppet @ Seat
Puppet @ SeatPuppet @ Seat
Puppet @ Seat
 
Shell script-sec
Shell script-secShell script-sec
Shell script-sec
 
Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scripting
 
Ansible - Introduction
Ansible - IntroductionAnsible - Introduction
Ansible - Introduction
 
Docker workshop 0507 Taichung
Docker workshop 0507 Taichung Docker workshop 0507 Taichung
Docker workshop 0507 Taichung
 
Can you upgrade to Puppet 4.x?
Can you upgrade to Puppet 4.x?Can you upgrade to Puppet 4.x?
Can you upgrade to Puppet 4.x?
 
Kubernetes #4 volume &amp; stateful set
Kubernetes #4   volume &amp; stateful setKubernetes #4   volume &amp; stateful set
Kubernetes #4 volume &amp; stateful set
 

Similar a Eclipse HandsOn Workshop

Painless Perl Ports with cpan2port
Painless Perl Ports with cpan2portPainless Perl Ports with cpan2port
Painless Perl Ports with cpan2port
Benny Siegert
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012
Carlos Sanchez
 

Similar a Eclipse HandsOn Workshop (20)

Php Development With Eclipde PDT
Php Development With Eclipde PDTPhp Development With Eclipde PDT
Php Development With Eclipde PDT
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
 
Eclipse Pdt2.0 26.05.2009
Eclipse Pdt2.0 26.05.2009Eclipse Pdt2.0 26.05.2009
Eclipse Pdt2.0 26.05.2009
 
Capistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient wayCapistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient way
 
Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1
 
Developing with-devstack
Developing with-devstackDeveloping with-devstack
Developing with-devstack
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and Puppet
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developer
 
Painless Perl Ports with cpan2port
Painless Perl Ports with cpan2portPainless Perl Ports with cpan2port
Painless Perl Ports with cpan2port
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Aucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksAucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricks
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetes
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Dockerized maven
Dockerized mavenDockerized maven
Dockerized maven
 
GradleFX
GradleFXGradleFX
GradleFX
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
 
Continuous Integration: SaaS vs Jenkins in Cloud
Continuous Integration: SaaS vs Jenkins in CloudContinuous Integration: SaaS vs Jenkins in Cloud
Continuous Integration: SaaS vs Jenkins in Cloud
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShell
 

Más de Bastian Feder

Más de Bastian Feder (16)

JQuery plugin development fundamentals
JQuery plugin development fundamentalsJQuery plugin development fundamentals
JQuery plugin development fundamentals
 
Why documentation osidays
Why documentation osidaysWhy documentation osidays
Why documentation osidays
 
Solid principles
Solid principlesSolid principles
Solid principles
 
jQuery secrets
jQuery secretsjQuery secrets
jQuery secrets
 
Php unit the-mostunknownparts
Php unit the-mostunknownpartsPhp unit the-mostunknownparts
Php unit the-mostunknownparts
 
jQuery secrets
jQuery secretsjQuery secrets
jQuery secrets
 
PhpUnit - The most unknown Parts
PhpUnit - The most unknown PartsPhpUnit - The most unknown Parts
PhpUnit - The most unknown Parts
 
Introducing TDD to your project
Introducing TDD to your projectIntroducing TDD to your project
Introducing TDD to your project
 
jQuery's Secrets
jQuery's SecretsjQuery's Secrets
jQuery's Secrets
 
The Beauty and the Beast
The Beauty and the BeastThe Beauty and the Beast
The Beauty and the Beast
 
Php unit the-mostunknownparts
Php unit the-mostunknownpartsPhp unit the-mostunknownparts
Php unit the-mostunknownparts
 
The beautyandthebeast phpbat2010
The beautyandthebeast phpbat2010The beautyandthebeast phpbat2010
The beautyandthebeast phpbat2010
 
The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09
 
Php Documentor The Beauty And The Beast
Php Documentor The Beauty And The BeastPhp Documentor The Beauty And The Beast
Php Documentor The Beauty And The Beast
 
Bubbles & Trees with jQuery
Bubbles & Trees with jQueryBubbles & Trees with jQuery
Bubbles & Trees with jQuery
 
Ajax hands on - Refactoring Google Suggest
Ajax hands on - Refactoring Google SuggestAjax hands on - Refactoring Google Suggest
Ajax hands on - Refactoring Google Suggest
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Eclipse HandsOn Workshop

  • 1. Workshop Hands on Eclipse PDT 2.x Bastian Feder IPC 2009 papaya Software GmbH 15.11.2009
  • 2. Me, myself & I  Application developer  PHP since 2001  @papaya since 01.2008  OpenSource addict
  • 4. Installation  Download latest revision from Eclipse website (http://www.eclipse.org/pdt/downloads) ▹ All in one (recommended): provides everything you need to run PDT ▹ PDT Feature / Update Manager: extends an existing Eclipse, but all dependencies PDT relies on needs to be installed first.  Extract archive  Copy to favorized location (e.g. /usr/local/bin/ or another location in your application path)
  • 5. Installation (II) ● Java Runtime Environment – Linux: sun-java6-jre from multiverse repository ● Switch off any kind of indexer and/or crawler – Virus scanner – Spotlight (MacOsX) – GnomeDo / KRunner (Linux) – Windows Indexing Service – ...
  • 6. Start the engines ● Set current language – System > Systemverwaltung > Sprachunterstützung ● open Anwendungen > Zubehör > Terminal #> cd IPC09_Workshop ¶ #> sudo chmod -R ubuntu:ubuntu workspace ¶ #> ./bin/eclipse/eclipse ¶
  • 8. Tips and Tricks (Configuration)  Heap space (memory allocated by JRE) size depends on system memory capacity ▹ Xms, Xmx ▹ XXMaxPermSize, XXPermSize  Eclipse PDT settings ▹ validation / build settings ▹ disable automatic updates
  • 9. Look and feel HandsOn
  • 10. Perspectives & Views  Perspective (Window > Open Perspektive) ▹ Arrangement of Views: PHP Perspektive contains e.g. 'PHP Explorer', 'Outline' and 'Project Outline'  Views or Tabs (Window > Show View) ▹ Viewport providing specific information and/or functionality
  • 11. Working Sets Group elements for display in views or for operations on a set of elements.
  • 12. Pause Until 14:45hrs
  • 13. Working with Eclipse  Projects  Templates  Code completion  ...
  • 14. Projects  Organizational untis  Customizable configuration  PHP include path ▹ Validation  Build rules ▹ included resources ▹ excluded resources
  • 15. Templates  Contextual predefined code snippets  Configure at Preferences > PHP > Templates
  • 16. File templates  Create new files with predefined structures  Easy to create or adapt
  • 17. Code templates  Activation key: <CTRL> + space  Code templates ▹ Eases typing of complex code structures (e.g. switch – statement) ▹ Minimize errors switch ($action) { ▹ Act like a form case 'read': ; break; default: ; break; }
  • 18. Code templates (II)  Capable of code completion  Set cursor positioning (${cursor}, ${})  Dynamic content by use of variables ▹ ${class} switch (${dollar}${variable}) { case ${value}: ▹ ${function} ${cursor}; ▹ ${variable} break; ▹ ${value} default: ; break; }
  • 19. Pause Until 16:00hrs
  • 20. External Tools Framework  Enables Eclipse to run ,stand-alone' applications  Two broad classes of external tools are available: ▹ Ant build files ▹ Everything else
  • 22. Subversive (installation)  Eclipse update site http://download.eclipse.org/technology/subversive/0.7/update-site/
  • 23. Subversion (client configuration)  Set „auto-properties“ ▹ WinXp: C:Dokumente und Einstellungen<USER>AnwendungsdatenSubversionconfig ▹ MacOs / Linux: ~/.subversion/config [miscellany] global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store .project .cache .settings enable-auto-props = yes [auto-props] *.js = svn:eol-style=LF;svn:keywords=Id LastChangedDate LastChangedRevision URL *.css = svn:eol-style=LF;svn:keywords=Id LastChangedDate LastChangedRevision URL *.php = svn:eol-style=LF;svn:keywords=Id LastChangedDate LastChangedRevision URL *.html = svn:eol-style=LF;svn:mime-type=text/html;svn:keywords=LastChangedDate LastChangedRevision URL *.htm = svn:eol-style=LF;svn:mime-type=text/html;svn:keywords=LastChangedDate LastChangedRevision URL *.xsl = svn:eol-style=LF *.xml = svn:eol-style=LF *.xsd = svn:eol-style=LF
  • 24. Plugins  Subclipse managing SVN repositories from inside Eclipse  JSEclipse Provides additional features supporting JavaScript  Data Tools Platform managing databases from inside Eclipse
  • 25. xDebug  Debugging for PHP by Derick Rethans (http://www.xdebug.org)  Provides profiling, tracing, code coverage, …  Cross platform
  • 26. xDebug configuration  Add to php.ini (e.g. on Mac) [XDebug] ;; Only Zend OR (!) XDebug zend_extension="/Applications/xampp/xamppfiles/lib/php/php5/extensions/no-debug-non-zts-20060613/xdebug.so" xdebug.remote_enable=true xdebug.remote_host=127.0.0.1 ;if debugging on remote server, put client IP here xdebug.remote_port=9000 xdebug.remote_handler=dbgp ;; profiler xdebug.profiler_enable=Off xdebug.profiler_enable_trigger=On xdebug.profiler_output_dir=/data_lokal/temp/xdebug/profiling  or .htaccess - file #-------------------------------# # xDebug section # #-------------------------------# php_value xdebug.remote_enable 1 php_value xdebug.remote_handler bdgp php_value xdebug.remote_host 127.0.0.1 ;if debugging on remote server, put client IP here ;; php_value xdebug.allowed_clients <client IP address> php_value xdebug.remote_port 9000 # profiler php_value xdebug.profiler_enable_trigger 1 php_value xdebug.profiler_enable 0 php_value xdebug.profiler_output_dir "/data_lokal/temp/xdebug/profiling"
  • 27. xDebug (III)  Debug dialog
  • 28. xDebug (IV)  Configure PDT to talk to xDebug
  • 29. xDebug (IV)  Configure the 'Server' handling the debugging session
  • 30. Questions? Further questions? Ask me at: php@bastian-feder.de
  • 31. Contact'n Rate  Contact ▹ Blog: http://bastian-feder.de ▹ Email: php@bastian-feder.de  Rate the workshop @ http://joind.in/talk/view/1067
  • 32. References  Eclipse PDT (http://www.eclipse.org/pdt)  Eclipse plugins ▹ Subversive (http://subclipse.tigris.org) ▹ JSEclipse (http://www.interaktonline.com/products/eclipse/jseclipse/overview)  xDebug (http://www.xdebug.org)  PhpDocumentor @ pear.php.net (http://pear.php.net/package/PhpDocumentor/docs/1.4.2)  SVN keyword substitution (http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.advanced.props.special.keywords)
  • 33. License  This set of slides and the source code included in the download package is licensed under the Creative Commons Attribution- Noncommercial-Share Alike 2.0 Generic License http://creativecommons.org/licenses/by-nc-sa/2.0/deed.en