Installing Eclipse on Windows
There are many IDEs available for working with PHP files and of course you may use any tools that you like. However, I have found many advantages to using Eclipse for developing PhpGedView:
- Integration with CVS and SVN. You don't have to switch back and forth between programs.
- Open Source
- PHP Syntax Highlighting and intellisense (i.e. code completion)
- Built-in PHPDoc (i.e. get API documentation about functions and classes just by hovering over them)
- Planned support for integrated debugging in the near future
This page will detail how to setup Eclipse for working on PhpGedView.
PHP Eclipse Plug-ins
Eclipse is an extensible IDE that allows you to install plugins to do different types of development. In order to develop PHP in the Eclipse IDE, you need to install a PHP Plugin for Eclipse.
There are two main PHP Plug-ins:
- PHPEclipse - an open source project external to the Eclipse project. Has the benefit of being around longer.
- Eclipse PHP IDE - an internal Eclipse project sponsored by IBM and Zend to produce a PHP IDE.
Both plugins are very good. I have found the debugger in PHPEclipse to be very slow when working with PhpGedView. The Eclipse PHP IDE debugger is still under development.
You may obtain the latest Eclipse release from http://www.eclipse.org/downloads/
Eclipse comes as a ZIP file which can be extracted anywhere. However, I have discovered that you can run into path length problems (255 char max in Windows XP) if you unpack Eclipse in a deep directory structure. C:\Program Files\eclipse is a good place to put it.
You may want to spring for the all-in-one package provided by the PHP IDE project. It has everything you need to get started using PHP with Eclipse. http://download.eclipse.org/tools/php/downloads/index.php?release=I20060926-024
Installing the PHP Plugin
If you installed the all-in-one package then you don't need to do anything in this section and you are ready to start Eclipse.
- Download one of the plugins:
- Unpackage the downloaded file and copy the features and plugins folders to your Eclipse directory (C:\Program Files\eclipse)
- Start Eclipse and switch to the PHP Perspective
- You may need to close the Welcome Page if you have never used Eclipse before.
- Using the menus, navigate to: Window->Open Perspective->Other...
- Select PHP from the list of Perspectives
- If you don't see PHP listed as one of the options, then you are probably missing some other required plugins. See the documentation for your selected plug-in to see what other plugins are required.
Installing the Subclipse Subversion Plugin
Eclipse includes built-in support for CVS. So if you plan to use the CVS code you are set.
But you probably want to use the latest development code from the Subversion (SVN) repository. In order to access Subversion from Eclipse, you will need to install the Subclipse plugin
The Subclipse plugin should be installed using Eclipse's online update manager. The Subclipse team has put together a good install guide here: http://subclipse.tigris.org/install.html
Checkout the Project from SVN
- First you should check that you have a good workspace location.
- From the File menu select the Switch Workspace option
- You should choose a workspace that is outside the user space (i.e. Documents and Settings) because IIS and the Windows ACL will have trouble accessing all of the include files and will give you lots of permissions errors.
- A good location would be something like C:\workspace or C:\phpgedview\workspace
- Open the SVN Repository Perspective
- From the Window menu select the Open Perspective menu item, then select the Other option
- The select perspective window appears. Choose the SVN Repository Exploring option from the list and hit OK
- Right click in the SVN Repository view and select the New -> Repository Location option.
- Set the repository URL to: https://phpgedview.svn.sourceforge.net/svnroot/phpgedview
- Checkout the files as a new PHP project
- Expand the https://phpgedview.svn.sourceforge.net/svnroot/phpgedview repository
- Expand the trunk element
- Right-click on the phpGedView folder and select "Checkout..."
- Select the option to Check out as a project configured using the new project wizard and click Finish
- Choose PHP as the project option
- Enter a name for your project and click finish