Development environment

pulse00 edited this page Aug 29, 2012 · 24 revisions

Setting up the development environment

As this has led to confusion in the past, i hereby state the obvious:

THESE ARE NOT END-USER INSTALLATION INSTRUCTIONS. It is a guide for plugin developers who want to contribute code to the Symfony plugin itself. If you merely want to use the plugin for your Symfony projects, see the installation section of the plugins project page.

I recommend to use a clean eclipse installation for the plugin development – otherwise things get messed up with existing dltk/pdt versions.

Install the following plugins from the indigo updatesite:

1. EMF – Eclipse Modeling Framework SDK
2. Eclipse Web Developer Tools
3. Eclipse XML Editors and Tools
4. Eclipse EGit
5. Eclipse JGit

Add the Orbit Updatesite to eclipse and install these plugins:

1. Apache Jakarta Commons Lang

Configure API Baselines to ignore missing baselines:

Preferences → Plug-in Development → API Baselines → Missing API baseline: ignore

For setting up the required projects a Team Project Set is provided. Simply follow these steps in eclipse:

1. Import → Team → Project Set file
2. Insert the .psf URL:
3. Click finish.

This will clone all required projects. Be patient, this will take some time.

After importing the .psf file, all required projects should be available in your workspace. However, you still need to generate the PHP Parser:

1. Search for the org.eclipse.php.core project in the workspace
2. Browse to Resources → parserTools
3. Right click the `build.xml` file and select run as → Ant build

This will generate the PHP Parser (you should see some output in the console).

At this point all projects in your workspace should compile without errors.

You can now create a new launch configuration:

  • Open Debug Configurations Dialog (Run→Debug Configurations)
  • Create a new “Eclipse Application”
  • Click “Debug”

A new eclipse instance should start with the symfony plugin loaded. In the debug-instance you can switch to the PHP perspective and add an empty PHP Project.

To verify that the plugin is loaded, right click on the new PHP project. You should see a new menuentry called “Convert to Symfony Project” in the “Configure” submenu.