User Tools

Site Tools


php:eclipsepdt

Eclipse PDT(PHP Development Tool)

Install with Eclipse Available

  1. Step1: Download and Install Eclipse EE from https://eclipse.org/downloads/. You must specify java version on your computer to download eclipse 32bits(java 32bits) or 64bit(java 64bits)(You should install Eclipse 3.6 32bits to install hibernate tool and run with java 32bits)
  2. Step2: In Eclipse, click Help → Install New Software and work with: http://download.eclipse.org/tools/pdt/updates/3.5

Basic Config

Show some basic windows in Eclipse PDT

  • Window→Show View→PHP Explorer
  • Window→Show View→PHP Functions
  • Window→Show View→PHP Project Outline

change between PHP screen and Debug Screen

If you want change to mode PHP for coding or mode Debug for debug, Click button PHP or Debug at top right corner

PHP Editor Config

common config for PHP

Under Window → Preferences:

  • set Encoding UTF-8: Expand left menu to General → Workspace:
    • Check Text file encoding and select:
      Other:
        UTF-8
    • Check New text file line delimiter and select:
      Other:
        Unix
  • Ensure that spaces are used instead of tabs: Expand left menu to General → Editors → Text Editors
    • Check Insert spaces for tabs
    • Change Displayed Tab Width: 4
  • Removing trailing whitespaces: Click left menu PHP→Editor→Save Actions: check Remove trailing whitespace and select All lines

Config to editor Drupal

Config to recognize drupal files

  • Step1: config common config for PHP
  • Step2: config Drupal file types are recognized as PHP files:
    • Under Window → Preferences, Expand left menu to General → Editors → File Associations. Under File Associations on the right click 'content type', Add add the *.engine, *.theme, *.install, *.inc, *.make (for Drush make files), *.module, *.profile and *.test in “PHP Content Type”

Import drupal project

Under menu File→New→PHP Project from Existing Directory

Config Editor for zend framework

Config to recognize zend framework files

  • Step1: config common config for PHP
  • Step2: config zend framework file types are recognized as PHP files:
    • Under Window → Preferences, Expand left menu to General → Editors → File Associations. Under File Associations on the right click 'content type', Add add the *.php, *.phtml in “PHP Content Type”

Import zend framework project

Under menu File→New→PHP Project from Existing Directory

Config debug PHP

  • change debug mode in “Run Configuration”
php/eclipsepdt.txt · Last modified: 2022/10/29 16:15 by 127.0.0.1