Eclipse PDT HOWTO

In this guide we will show you how to get Eclipse PDT working for all of your web development tasks: PHP, SQL, HTML, CSS, JavaScript, XML, SVN, FTP and more.



1. Eclipse PDT.
Go to PDT Project Downloads, choose the latest Release build (currently we use 1.0.x because 2.0.x is unstable) and download PDT All-in-one package for your OS.

Unpack it into your program folder (for Windows users it will be C:\Program Files, for Linux users it is usually /opt). Create a shortcut to eclipse executable on your desktop. Now you got most of PDT functionality working!

a. To start a new project, click File => New => PHP Project. and click Next
b. Enter the name of choice (Likely will be Cotonti)
c. Below Check the box, "Enable Project Specific settings"
d. And Choose PHP Verison 5 or greater and click Finish

To import an existing project on your hard disk to Eclipse, do the following:
a. Copy .project file into the root of your project folder from some existing project. Edit this file and set new project name.
b. Open Eclipse and run File => Import => General => Existing Project into Workspace.
c. Locate your project on hard disk, make sure it appears in "Projects" combo and hit "Finish".

Don't forget to set editor and formatter options in Window => Preferences.

2. Subversive.

To install subversive you should do the following:
a. Run Eclipse as administrator/root.
b. Go to Help => Software Updates => Find and Install, select Search New Features to Install.
c. Add these URLs with "New Remote Site button":
Name: Mylyn 3.3
URL: http://download.eclipse.org/tools/mylyn/update/e3.3

Name: Subversive 0.7 Update
URL: http://download.eclipse.org/technology/subversive/0.7/update-site/

Name: Subversive SVN Connectors
URL: http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/

d. Check them and click Finish.
e. Select your Mirror you want (I recommend auto select, or you will be asked a few times)Wait for repository check, then select these packages for install:

Mylyn 3.3
  • Mylyn Feature (just check the main box)
  • Mylyn Integration - (Expand this section and choose)
  • Team Support
  • Eclipse IDE
  • Bugzilla

Subversive 0.7 Update
  • Subversive Integration Plugins (just check the main box)
  • Subversive SVN Team Provider (Expand this section and choose)
  • SVN Team Provider

Subversive SVN Connectors
  • Subversive SVN Connectors (Expand this section and choose)
  • Subversive SVN Connectors
  • [SVNkit 1.1.7

Names may be different, I don't remember them by heart, sorry.
f. Install the plugins and reload Eclipse.

How to import Cotonti SVN as Eclipse PDT project:
a. Go to File => Import => SVN => Projects From SVN.
b. Click Next and switch Create a new repository location.
c. Put svn://svn.cotonti.com/ as the URL if you want to import the entire repository into this project, or a more exact URL if you want to create a project for a part. For example, trunk URL looks like svn://svn.cotonti.com/trunk/. In Authentication section put your SVN login and password.
d. Click Finish to finish the import process.

SVN projects are normal projects, so you can add/remove/edit files in folders. But take care because it will affect the repository after you do a commit. Normally, SVN operations are performed by clicking with Right Mouse Button on a folder you want to sync, then going to Team and selecting one of these actions:
* Update - get latest updates from the repository
* Commit - put your updates to the repository
* Synchronize - custom synchronization operations
* Lock - temporarily lock files/folders
* Unlock - remove the lock set by yourself
* Tag - tag current version as stable

3. Aptana Plugin.

I've noticed Aptana is quite unstable, so I would not recommend it if you want a stable environment.


4. FAQ.

Switch to PHP Perspective. Don't forget to switch to PHP Perespective (Open Perspective button is on the right top of the window).

How to add HTML markup to .tpl files? Go to Window => Preferences => General => Cotnent Types => Text => HTML and add *.tpl extension.

Eclipse doesn't act as default editor for files. All files should be managed edited within "PHP Explorer" in Eclipse. Eclipse is workspace and project-oriented, it's used to manage entire projects and sites (a project per site is recommended, do not import all your htdocs into one project). For smaller things and to edit files outside of your workspace/project use other lightweight editors of your choice.


1. motor2hg  2009-02-16 06:05
Версия программного продукта Eclips изменилась, по этому ссылки, указанные автором в статье больше не работают. Исключением есть только:

Name: Subversive SVN Connectors
URL: http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/

для того, что-бы правильно установить другие компоненты сделайте рефреш, на вкладке Available Software, потом жмём кнопку Menage Sites и выделите чекбоксы необходимых сайтов.
Потом ОК и соответственно то что на рисунке ниже



РS: Настолько ограничены инструментарий комментариев, просто шок. Ну центровку то можно оставить?
2. motor2hg  2009-02-16 06:11
Редактирование комментарий работает некорректно! Редактировать можно, но отправка отредактированного текста приводит к сбою!
Прошу прощения за то, что не на Английском.
3. motor2hg  2009-02-16 06:13
4. motor2hg  2009-02-16 06:16
нет редактирование происходит но редирект на страницу из которой вызвали комментарий не срабатывает, см. рис. вверху.
5. motor2hg  2009-02-16 06:24
По статье, статья написана очень грамотно, Eclipse очень удобная среда разработки и что более всего мне в ней нравится, это то, что она кросплатформенна. Одинаково хорошо работает на nix, Windows и Mac OS X.
6. Trustmaster  2009-02-24 02:09
Частично пофиксил, т.к. это баг исключительно этого сайта.

P.S.: I have moved to NetBeans IDE, because Eclipse 3.4 is way too slow on my PC(s).
7. tensh  2009-04-21 20:01
Is it so special that you have to speak in Russian? It makes other people feel ommited. Use English please.
Only registered users can post new comments